Part Number Hot Search : 
SMP11 CR12A AP9563GK MAX3081E 0022122 02K50 ECG2331 XEB01010
Product Description
Full Text Search
 

To Download ENC624J600T-IPT Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2010 microchip technology inc. ds39935c enc424j600/624j600 data sheet stand-alone 10/100 ethernet controller with spi or parallel interface downloaded from: http:///
ds39935c-page ii ? 2010 microchip technology inc. information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyers risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, dspic, k ee l oq , k ee l oq logo, mplab, pic, picmicro, picstart, rfpic and uni/o are registered trademarks of microchip technology incorporated in the u.s.a. and other countries. filterlab, hampshire, hi-tech c, linear active thermistor, mxdev, mxlab, seeval and the embedded control solutions company are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, appl ication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, dsspeak, ecan, economonitor, fansense, hi-tide, in-circuit serial programming, icsp, mindi, miwi, mpasm, mplab certified logo, mplib, mplink, mtouch, octopus, omniscient code generation, picc, picc-18, picdem, picdem.net, pickit, pictail, pic 32 logo, real ice, rflab, select mode, total endurance, tsharc, uniwin driver, wiperlock and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2010, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. note the following details of the code protection feature on microchip devices: microchip products meet the specification cont ained in their particular microchip data sheet. microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip products in a manner outside the operating specifications contained in microchips data sheets. most likely, the person doing so is engaged in theft of intellectual property. microchip is willing to work with the customer who is concerned about the integrity of their code. neither microchip nor any other semiconductor manufacturer c an guarantee the security of their code. code protection does not mean that we are guaranteeing the product as unbreakable. code protection is constantly evolving. we at microchip are co mmitted to continuously improvi ng the code protection features of our products. attempts to break microchips c ode protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the companys quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory an d analog products. in addition, microchips quality system for the design and manufacture of development systems is iso 9001:2000 certified. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 1 enc424j600/624j600 ieee 802.3? compliant fast ethernet controller integrated mac and 10/100base-t phy hardware security acceleration engines 24-kbyte transmit/receive packet buffer sram supports one 10/100base-t port with automatic polarity detection and correction supports auto-negotiation support for pause control frames, including automatic transmit and receive flow control supports half and full-duplex operation programmable automatic retransmit on collision programmable padding and crc generation programmable automatic rejection of erroneous and runt packets factory preprogrammed unique mac address mac: - support for unicast, multicast and broadcast packets - supports promiscuous reception - programmable pattern matching - programmable filtering on multiple packet formats, including magic packet?, unicast, multicast, broadcast, specific packet match, destination address hash match or any packet phy: - wave shaping output filter - internal loopback mode - energy detect power-down mode available mcu interfaces: - 14 mbit/s spi interface with enhanced set of opcodes (44-pin and 64-pin packages) - 8-bit multiplexed parallel interface (44-pin and 64-pin packages) - 8-bit or 16-bit multiplexed or demultiplexed parallel interface (64-pin package only) security engines: - high-performance, modular exponentiation engine with up to 1024-bit operands - supports rsa ? and diffie-hellman key exchange algorithms - high-performance aes encrypt/decrypt engine with 128-bit, 192-bit or 256-bit key - hardware aes ecb, cbc, cfb and ofb mode capability - software aes ctr mode capability - fast md5 hash computations - fast sha-1 hash computations buffer: - configurable transmit/receive buffer size - hardware-managed circular receive fifo - 8-bit or 16-bit random and sequential access - high-performance internal dma for fast memory copying - high-performance hardware ip checksum calculations - accessible in low-power modes - space can be reserved for general purpose application usage in addition to transmit and receive packets operational: - outputs for two led indicators with support for single and dual led configurations - transmit and receive interrupts -25mhz clock - 5v tolerant inputs - clock out pin with programmable frequencies from 50 khz to 33.3 mhz - operating voltage range of 3.0v to 3.6v - temperature range: -40c to +85c industrial available in 44-pin (tqfp and qfn) and 64-pin tqfp package s device sram (bytes) pin count speed (mbps) security spi psp modex 1024-bit md5 sha-1 aes 256-bit multiplexed demultiplexed 8-bit 16-bit 8-bit 16-bit enc424j600 24k 44 10/100 y y y y y n n n enc624j600 24k 64 10/100 y y y y y y y y stand-alone 10/100 ethernet controller with spi or parallel interface downloaded from: http:///
enc424j600/624j600 ds39935c-page 2 ? 2010 microchip technology inc. pin diagrams 44-pin tqfp and qfn 10 11 23456 1 18 19 20 21 2212 13 14 15 38 87 44 43 42 41 40 39 16 17 29 30 31 32 33 23 24 25 26 27 28 36 3435 9 37 enc424j600 v ssosc ad4 osc2 osc1 v ddosc ad5ad6 ledb leda tpout+ tpout- v sstx ad9 ad10 ad11 ad12 si/rd/rw sck/al v ss ad7 rbias v sspll v ddpll v ssrx v ddtx v ddrx tpin- tpin+ int /spisel clkout ad8 pspcfg0 ad14 v ss ad13 v cap ad0 so/wr/en cs /cs ad1ad2 v dd ad3 v sstx downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 3 enc424j600/624j600 pin diagrams (continued) 12345678910111213141516 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 enc624j600 a12 pspcfg2 a14/pspcfg1 a13 a11 a10 a9 a8 a7 a5 a4 a3 a2 a1 wrh/b1sel a6 a0 pspcfg3 ad7 ad6 ad5 ad4 osc1 osc2 v ssosc v ddosc clkout ledb leda ad11 ad10 ad9 ad8 tpin- v sstx v ddtx tpout- tpout+ v sstx v ss ad15 ad14 ad13 ad12 v ssrx rbias v ddpll v ddrx v sspll int /spisel cs/ cs so/wr/wrl/en/b0sel si/rd/rw sck/al/pspcfg4 ad0ad1 ad2 v dd v cap v ss ad3 v dd v dd tpin+ 64-pin tqfp downloaded from: http:///
enc424j600/624j600 ds39935c-page 4 ? 2010 microchip technology inc. table of contents 1.0 device overview ............................................................................ ................................. ............................................................. 5 2.0 external connections ........................................... ................................................... .......... ........................................................... 9 3.0 memory organization .......................................... ................................................... ............ ........................................................ 17 4.0 serial peripheral interface (spi)........................................ ................................................... ...................................................... 39 5.0 parallel slave port interface (psp) ....................... .................................................................. ................................................... 51 6.0 ethernet overview .......................................................................... ................................. ........................................................... 71 7.0 reset .......................................................................................... ................................................................................................ 73 8.0 initialization............................................................................ .................................. ................................................................... 75 9.0 transmitting and receiving packets ........................................ .................................................. ................................................ 83 10.0 receive filters............................................................................ ................................................................................................ 95 11.0 flow control ................................................................................. .............................. .............................................................. 105 12.0 speed/duplex configuration and auto-negotiation................................. ........................................... ...................................... 109 13.0 interrupts ................................................................................. ................................................................................................. 117 14.0 direct memory access (dma) controller ........................ .............................................................. ........................................... 123 15.0 cryptographic security engines ......................................... ................................................... . .................................................. 125 16.0 power-saving features......................................................... ............................................. ...................................................... 137 17.0 electrical characteristics ....................................................... .......................................... ......................................................... 141 18.0 packaging information............................................. ......................................................... ........................................................ 149 appendix a: revision history.......................................... ................................................... ...... .......................................................... 157 index ................................................. ................................................... ...................... ........................................................................ 159 the microchip web site .................................................................. ....................................... ............................................................ 163 customer change notification service ....................................... ................................................... . ................................................... 163 customer support ............................................... ................................................... ............. ............................................................... 163 reader response ................................................. ................................................... ............ .............................................................. 164 product identification system.................................................. ................................................................................................. .......... 165 to our valued customers it is our intention to provide our valued customers with the be st documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publications to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regardi ng this publication, please contact the marketing communications department via e-mail at docerrors@microchip.com or fax the reader response form in the back of this data sheet to (480) 792-4150. we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the vers ion number, (e.g., ds30000a is version a of document ds30000). errata an errata sheet, describing minor operational differences fr om the data sheet and recommended workarounds, may exist for curren t devices. as device/documentation issues become known to us, we will publish an errata sheet. the errata will specify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a particular device, please check with one of the following: microchips worldwide web site; http://www.microchip.com your local microchip sales office (see last page) when contacting a sales office, please specify which device, re vision of silicon and data sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 5 enc424j600/624j600 1.0 device overview this document contains device-specific information for the following devices: enc424j600 enc624j600 the enc424j600 and enc624j600 are stand-alone, fast ethernet controllers with an industry standard serial peripheral interface (spi) or a flexible parallel interface. they are designed to serve as an ethernet network interface for any microcontroller equipped with spi or a standard parallel port. enc424j600/624j600 devices meet all of the ieee 802.3 specifications applicable to 10base-t and 100base-tx ethernet, including many optional clauses, such as auto-negotiation. they incorporate a number of packet filtering schemes to limit incoming packets. they also provide an internal, 16-bit wide dma for fast data throughput and support for hardware ip checksum calculations. for applications that require the security and authenti- cation features of ssl, tls and other protocols related to cryptography, a block of security engines is provided. the engines perform rsa, diffie-hellman, aes, md5 and sha-1 algorithm computations, allowing reduced code size, faster connection establishment and throughput, and reduced firmware development effort. communication with the microcontroller is implemented via the spi or parallel interface, with data rates ranging from 14 mbit/s (spi) to 160 mbit/s (demultiplexed, 16-bit parallel interface). dedicated pins are used for led link and activity indication and for transmit/receive/dma interrupts. a generous 24-kbyte on-chip ram buffer is available for tx and rx operations. it may also be used by the host microcontroller for general purpose storage. communication protocols, such as tcp, can use this memory for saving data which may need to be retransmitted. for easy end product manufacturability, each enc624j600 family device is preprogrammed with a unique nonvolatile mac address. in most cases, this allows the end device to avoid a serialized programming step. the only functional difference between the enc424j600 (44-pin) and enc624j600 (64-pin) devices are the number of parallel interface options they support. these differences, along with a summary of their common features, are provided in table 1-1. a general block diagram for the devices is shown in figure 1-1. a list of the pin features, sorted by function, is presented in table 1-2. table 1-1: device features for enc424j600/624j600 feature enc424j600 enc624j600 pin count 44 64 ethernet operating speed 10/100 mbps (auto-negotiate, auto-sense or manual) ethernet duplex modes half and full (auto-negotiate and manual) ethernet flow control pause and backpressure (auto and manual) buffer memory (bytes) 24k (organized as 12k word x 16) internal interrupt sources 11 (mappable to a single external interrupt flag) serial host interface (spi) yes yes parallel host interface: operating modes 2 8 muliplexed, 8-bit yes yes 16-bit no yes demultiplexed, 8-bit no yes 16-bit no yes cryptographic security options: aes, 128/192/256-bit yes yes md5/sha-1 yes yes modular exponentiation, 1024-bit yes yes receive filter options accept or reject packets with crc match/mis match, runt error collect or reject, unicast, not-me unicast, multicast, broadcast, magic packet?, pattern table and hash table packages 44-pin tqfp, qfn 64-pin tqfp downloaded from: http:///
enc424j600/624j600 ds39935c-page 6 ? 2010 microchip technology inc. figure 1-1: enc424j600/624j600 block diagram 24 kbytes dma and checksum tx control rx control arbiter flow control host interface control registers 25 mhz power-on phy mii interface miim interface tpout+ tpout- tpin+ tpin- tx rx rbias osc1 osc2 control logic cs /cs si/rd/rw so sck/al int v cap clkout leda ledb rx filter mac m3 m1 sram note 1: a<14:0>, ad15, wrl/b0sel, wrh/b1sel and pspcfg<4:1> are available on 64-pin devices only. pspcfg0 is available on 44-pin devices only. reset oscillator i/o interface ad<15:0> (1) a<14:0> (1) logic logic crypto cores memory bus interface spi parallel common spisel pspcfgx (1) en/b0sel (1) wr/wrl/ wrh/ b1sel (1) m0 m2 pll voltage regulator downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 7 enc424j600/624j600 table 1-2: enc424j600/624j600 pinout descriptions pin name pin number pin type input buffer description 44-pin 64-pin ad0 38 53 i/o cmos psp multiplexed address input and/or bidirectional data bus ad1 39 54 i/o cmos ad2 40 55 i/o cmos ad3 41 56 i/o cmos ad4 5 5 i/o cmos ad5 6 6 i/o cmos ad6 7 7 i/o cmos ad7 8 8 i/o cmos ad8 25 35 i/o cmos ad9 26 36 i/o cmos ad10 27 37 i/o cmos ad11 28 38 i/o cmos ad12 29 39 i/o cmos ad13 30 40 i/o cmos ad14 31 41 i/o cmos ad15 42 i/o cmos a0 57 i cmos psp demultiplexed address input bus a1 58 i cmos a2 59 i cmos a3 60 i cmos a4 61 i cmos a5 9 i cmos a6 10 i cmos a7 11 i cmos a8 12 i cmos a9 13 i cmos a10 19 i cmos a11 20 i cmos a12 43 i cmos a13 44 i cmos a14 45 i cmos al 37 52 i cmos psp address latch b0sel 50 i cmos psp byte 0 select b1sel 48 i cmos psp byte 1 select clkout 23 33 o programmable clock output for external use cs 34 49 i cmos spi chip select (active-low) cs 34 49 i cmos psp chip select (active-high) en 35 50 i cmos psp r/w enable strobe int 24 34 o interrupt output (active-low) leda 10 15 o programmable ethernet status/activity led ledb 9 14 o programmable ethernet status/activity led legend: i = input; o = output; p = power; cmos = cmos compatible input buffer; ana = analog level input/output downloaded from: http:///
enc424j600/624j600 ds39935c-page 8 ? 2010 microchip technology inc. osc1 3 3 i ana 25 mhz crystal oscillator/clock input osc2 2 2 o 25 mhz crystal oscillator output pspcfg0 32 i cmos psp mode select 0 pspcfg1 45 i cmos psp mode select 1 pspcfg2 17 i cmos psp mode select 2 pspcfg3 18 i cmos psp mode select 3 pspcfg4 52 i cmos psp mode select 4 rbias 11 16 i ana phy bias (external resistor) connection rd 36 51 i cmos psp read strobe rw 36 51 i cmos psp combined read/write signal sck 37 52 i cmos spi serial clock input si 36 51 i cmos spi serial data input (from master) so 35 50 o spi serial data out (to master) spisel 24 34 i cmos spi/psp interface select tpin- 17 27 i ana differential ethernet receive minus signal input tpin+ 16 26 i ana differential ethernet receive plus signal input tpout- 21 31 o differential ethernet transmit minus signal output tpout+ 20 30 o differential ethernet transmit plus signal output v cap 43 63 p regulator external capacitor connection v dd 44 21, 47, 64 p positive 3.3v power supply for digital logic v ddosc 4 4 p positive 3.3v power supply for 25 mhz oscillator v ddpll 12 22 p positive 3.3v power supply for phy pll circuitry v ddrx 15 25 p positive 3.3v power supply for phy rx circuitry v ddtx 18 28 p positive 3.3v power supply for phy tx circuitry v ss 33, 42 46, 62 p ground reference for digital logic v ssosc 1 1 p ground reference for 25 mhz oscillator v sspll 13 23 p ground reference for phy pll circuitry v ssrx 14 24 p ground reference for phy rx circuitry v sstx 19, 22 29, 32 p ground reference for phy tx circuitry wr 35 50 i cmos psp write strobe wrh 48 i cmos psp write high strobe wrl 50 i cmos psp write low strobe table 1-2: enc424j600/624j600 pinout descriptions (continued) pin name pin number pin type input buffer description 44-pin 64-pin legend: i = input; o = output; p = power; cmos = cmos compatible input buffer; ana = analog level input/output downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 9 enc424j600/624j600 2.0 external connections 2.1 oscillator enc424j600/624j600 devices are designed to operate from a fixed 25 mhz clock input. this clock can be generated by an external cmos clock oscillator or a parallel resonant, fundamental mode 25 mhz crystal attached to the osc1 and osc2 pins. use of a crystal, rated for series resonant operation, will oscillate at an incorrect frequency. to comply with ieee 802.3 ethernet timing requirements, the clock must have no more than 50 ppm of total error; avoid using resonators or clock generators that exceed this margin. when clocking the device using a crystal, follow the connections shown in figure 2-1. when using a cmos clock oscillator or other external clock source, follow figure 2-2. figure 2-1: crystal oscillator operation figure 2-2: external clock source 2.2 clkout pin the clock out pin (clkout) is provided for use as the host controller clock or as a clock source for other devices in the system. its use is optional. the 25 mhz clock applied to osc1 is multiplied by a pll to internally generate a 100 mhz base clock. this 100 mhz clock is driven through a configurable postscaler to yield a wide range of different clkout frequencies. the pll multiplication adds clock jitter, subject to the pll jitter specification in section 17.0 electrical characteristics . however, the postscaler ensures that the clock will have a nearly ideal duty cycle. the clkout function is enabled and the postscaler is selected via the cocon<3:0> bits (econ2<11:8>). to create a clean clock signal, the clkout output and cocon bits are unaffected by all resets and power-down modes. the clkout function is enabled out of por and defaults to producing a 4 mhz clock. this allows the device to directly clock the host processor. when the cocon bits are written with a new configuration, the clkout output transitions to the new frequency without producing any glitches. no high or low pulses with a shorter period than the original or new clock are generated. c1 (3) c2 (3) xtal osc2 r s (1) osc1 r f (2) to internal logic note 1: a series resistor, rs, may be required for crystals with a low drive strength specification or when using large loading capacitors. 2: the feedback resistor, r f , is typically 1.5 m ? ? approx ? . 3: the load capacitors value should be derived from the capacitive loading specification provided by the crystal manufacture. encx24j600 3.3v clock from external system (1) osc1 osc2 open note 1: duty cycle restrictions must be observed. encx24j600 downloaded from: http:///
enc424j600/624j600 ds39935c-page 10 ? 2010 microchip technology inc. 2.3 voltage and bias pin 2.3.1 v dd and v ss pins to reduce on-die noise levels and provide for the high-current demands of ethernet, there are many power pins on enc424j600/624j600 devices: v dd and v ss v ddosc and v ssosc v ddpll and v sspll v ddrx and v ssrx v ddtx and v sstx each v dd and v ss pin pair above should have a 0.1 ? f ceramic bypass capacitor placed as close to the pins as possible. for best emi emission suppression, other smaller capacitors, such as 0.001 ? f, should be placed immediately across v ddtx /v sstx and v ddpll /v sspll . all v dd power supply pins must be externally con- nected to the same 3.3v 10% power source. similarly, all v ss supply references must be externally connected to the same ground node. if a ground connection appears on two pins (e.g., v sstx ), connect both pins; do not allow either to float. in addition, it is recommended that the exposed bottom metal pad on the 44-pin qfn package be tied to v ss . placing ferrite beads or inductors between any two of the supply pins (e.g., between v ddosc and v ddrx ) is not recommended. however, it is acceptable to isolate all of the v dd supplies from the main circuit power sup- ply through a single ferrite bead or inductor, if desired for supply noise suppression reasons. such isolation is generally not necessary. 2.3.2 v cap pin most of the devices digital logic operates at a nominal 1.8v. this voltage is supplied by an on-chip voltage regulator, which generates the digital supply voltage from the v dd rail. the only external component required is an external filter capacitor, connected from the v cap pin to ground, as shown in figure 2-3. a value of at least 10 ? f is recommended. the capacitor must also have a relatively low equiva- lent series resistance (esr). it is recommended that a low-esr capacitor (ceramic, tantalum or similar) should be used and high-esr capacitors (such as aluminum electrolytic) should be avoided. the internal regulator is not designed to drive external loads; therefore, do not attach other circuitry to v cap . figure 2-3: v cap connections 2.3.3 rbias pin the internal analog circuitry in the phy module requires that an external 12.4 k ? , 1% resistor be attached from rbias to ground, as shown in figure 2-4. the resistor influences the tpout+/- signal amplitude. the rbias resistor should be placed as close as possible to the chip with no immediately adjacent signal traces in order to prevent noise capacitively coupling into the pin and affecting the transmit behavior. it is recommended that the resistor be a surface mount type. figure 2-4: rbias resistor v dd v cap v ss encx24j600 10 ? f 3.3v 0.1 ? f regulator +3.3v i/o, phy +1.8v core, ram, mac rbias encx24j600 12.4 ? k ??? 1% phy downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 11 enc424j600/624j600 2.4 ethernet signal pins and external magnetics typical applications for enc424j600/624j600 devices require an ethernet transformer module, and a few resistors and capacitors to implement a complete ieee 802.3 compliant 10/100 ethernet interface, as shown in figure 2-5. the ethernet transmit interface consists of two pins: tpout+ and tpout-. these pins implement a differential pair and a current-mode transmitter. to generate an ethernet waveform, ordinary applications require the use of a 1:1 center tapped pulse transformer, rated for 10/100 or 10/100/1000 ethernet operations. when the ethernet module is enabled and linked with a partner, current is continually sunk through both tpout pins. when the phy is actively transmitting, a differential voltage is created on the ethernet cable by varying the relative current sunk by tpout+ compared to tpout-. the ethernet receive interface similarly consists of a differential pair: tpin+ and tpin-. to meet ieee 802.3 compliance and help protect against electrostatic dis- charge, these pins are normally isolated from the ethernet cable by a 1:1 center tapped transformer (available in the same package as the tx transformer). internally, the phy uses a high-speed adc to sample the receive waveform and decodes it using a dsp. the phy implements many robustness features, including baseline wander correction (applicable to 100base-tx) and automatic rx polarity correction (applicable to 10base-t). four 49.9 ? , 1% resistors are required for proper termination of the tx and rx transmission lines. if the board layout necessitates long traces between the encx24j600 and ethernet transformers, the termina- tion resistors should be placed next to the silicon instead of the transformers. on the receive signal path, two 6.8 nf 10% capacitors are used. these capacitors, in combination with the 49.9 ? termination resistors, form an rc high-pass filter to reduce baseline wander. for best performance, these capacitors should not be omitted or changed. the various remaining capacitors provide dc current blocking and provide stability to the common-mode voltage of both of the differential pairs. the tpin+/- pins weakly output a common-mode voltage that is acceptable to the internal adc. for proper operation, do not attempt to externally force the tpin+/- common-mode voltage to some other value. the 10 ? 1% resistor provides a current path from the power supply to the center tap of the tx transformer. as mentioned previously, the tpout+/- pins implement a current mode drive topology in which the pins are only capable of sinking current; they do not produce a direct voltage. this current path through the transformer generates the transmit waveform. the 10 ? resistor reduces the amount of heat that the phy would have to dissipate, and therefore, must have a power rating of 1/12w or better. figure 2-5: typical ethern et magnetics connections encx24j600 tpout + tpout - tpin + tpin - 3.3v 12 3 4 5 6 7 8 rj-45 1:1 ct 1:1 ct 1000 pf, 2 kv 75 ? 75 ? 75 ? 75 ? 49.9 ? , 1% 49.9 ? , 1% 49.9 ? , 1% 49.9 ? , 1% 0.01 ? f 0.01 ? f 1 6.8 n f, 1 0 % 6.8 n f, 1 0 % 10 ? , 1/12w, 1% downloaded from: http:///
enc424j600/624j600 ds39935c-page 12 ? 2010 microchip technology inc. 2.4.1 additional emi and layout considerations to reduce emi emissions, common-mode chokes are shown adjacent to the transformers on the cable (rj-45) side. these chokes come standard in typical ethernet transformer modules. because the encx24j600 phy uses a current-mode drive topol- ogy, the transmit choke must normally be located on the cable side of the transmit transformer. orienting the magnetics such that the choke is on the phy side of the transmit transformer usually results in a distorted, non-compliant transmit waveform. however, some magnetics which wrap the tx center tap wire around the tx choke core can also be used to generate a compliant waveform (figure 2-6). these types of trans- formers may be desirable in some power-over ethernet (poe) applications. figure 2-6: alternate tx choke topology the common-mode choke on the rx interface can be placed on either the cable side or phy side of the receive transformer. recommended and required mag- netics characteristics are located in section 17.0 electrical characteristics . the four 75 ? resistors and high-voltage capacitor in figure 2-5 are intended to prevent each of the twisted pairs in the ethernet cables from floating and radiating emi. their implementation may require adjustment in poe applications. unless the tx and rx signal pairs are kept short, they should be routed between the encx24j600 and the ethernet connector following differential routing rules. like ethernet cables, 100 ? characteristic impedance should be targeted for the differential traces. the use of vias, which introduce impedance discontinuities, should be minimized. other board level signals should not run immediately parallel to the tx and rx pairs to minimize capacitive coupling and crosstalk. 2.5 leda and ledb pins the leda and ledb pins provide dedicated led status indicator outputs. the leds are intended to display link status and tx/rx activity among other programmable options; however, the use of one or both is entirely optional. the pins are driven automatically by the hardware and require no support from the host microcontroller. aside from the leds themselves, a current-limiting resistor is generally the only required component. by default on por, leda displays the ethernet link status, while ledb displays phy-level tx/rx activity. because the leds operate at the phy level, rx activity will be displayed on ledb any time ethernet packets are detected, regardless of if the packet is valid and meets the correct rx filtering criteria. normally, the device illuminates the led by sourcing current out of the pin, as shown in figure 2-7. connect- ing the led in reverse, with the anode connected to v dd and the cathode to leda/ledb (through a current-limiting resistor), causes the led to show inverted sense behavior, lighting the led when it should be off and extinguishing the led when the led should be on. figure 2-7: sing le color led connection both leds automatically begin operation whenever power is applied, a 25 mhz clock is present and the ethernet magnetics are present and wired correctly. a connection to the host microcontroller via the spi or psp interface is not required. leda and ledb can, therefore, be used as a quick indicator of successful assembly during initial prototype development. 2.5.1 using bi-color leds in space constrained applications, it is frequently desir- able to use a single bi-color led to display multiple operating parameters. these leds are connected between leda and ledb, as shown in figure 2-8. figure 2-8: bi-color led connection encx24j600 devices include two special hardware display modes to make maximal use of a bi-color led. these modes are selected when the lacfg<3:0> and lbcfg<3:0> bits (eidled<15:8>) are set to 1111 or 1110 . in these configurations, the link state turns the led on, the speed/duplex state sets the led color and tx/rx events cause the led to blink off. if a link is present, no tx/rx events are occurring and the speed/duplex state is 100 mbps/full duplex, respectively, then the ledb pin will be driven high while leda will be driven low. 1:1 ct phy rj-45 180 ? leda or ledb led 180 ? leda ledb led bi-color downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 13 enc424j600/624j600 2.6 i nt pin the int pin is an active-low signal that is used to flag interrupt events to external devices. depending on the application, it can be used to signal the host micro- controller whenever a packet has been received or transmitted, or that some other asynchronous operation has occurred. it can also be used to wake-up the microcontroller or other system components based on lan activity; its use is optional. the int pin is driven high when no interrupt is pending and is driven low when an interrupt has occurred. it does not go into a high-impedance state, except during initial power-on while the multiplexed spisel pin function is being used. since enc424j600/624j600 devices incorporate a buffer for storing transmit and receive packets, the host microcontroller never needs to perform real-time operations on the device. the microcontroller can poll the device registers to discover if the device status has changed. 2.7 host interface pins for the maximum degree of flexibility in interfacing with microcontrollers, enc424j600/624j600 devices offer a choice between a serial interface based on the serial peripheral interface (spi) standard, and a flexible 8 or 16-bit parallel slave port (psp) interface. only one interface may be used at any given time. the i/o interface is hardware selected on power-up using the spisel function on the int /spisel pin. this is done by latching in the voltage level applied to the pin approximately 1 to 10 ? s after power is applied to the device and the device exits power-on reset. if spisel is latched at a logic high state, the serial interface is enabled. if spisel is latched at a logic low state, the psp interface is enabled. figure 2-9 shows example connections required to select the spi or psp interface upon power-up. to ensure the spi interface is selected upon power-up, an external pull-up resistor to v dd must be connected to the spisel pin. alternatively, if the parallel interface is to be used, a pull-down resistor to v ss must be connected to the spisel pin. in most circuits, it is rec- ommended that a 100 k ? or smaller resistor be used to ensure that the correct logic level is latched in reliably. if a large capacitance is present in the spisel circuit, such as from stray capacitance, a smaller pull-up or pull-down resistor may be required to compensate and ensure the correct level is sensed during power-up. as spisel is multiplexed with the int interrupt output function, a direct connection to v dd or v ss without a resistor is prohibited. if int is connected to the host microcontroller, the microcontroller must leave this signal in a high-impedance state and not attempt to drive it to an incorrect logic state during power-up. if the v dd supply has a slow ramp rate, the device will exit por, exceed the 1 to 10 ? s latch timer and sample the spisel pin state before v dd has reached the spec- ified minimum operating voltage of the device. in this case, the device will still latch in the correct value, assuming the minimum v ih (d004) or maximum v il (d006) specification is met, which is a function of v dd . figure 2-9: using the int /spisel pin to select the i/o interface i/o sck sdo sdi int0 mcu cs scksi so int /spisel encx24j600 3.3v 100 ? k ? pmall pmcs2 rmrd pmwr int0 mcu al csrd wr int /spisel encx24j600 adx pmax/pmdx 100 ? k ? spi selected psp selected (mode 5 shown) ~2.2v v ss (internal weak pull-up on cs enabled) (internal weak pull-down on cs enabled) downloaded from: http:///
enc424j600/624j600 ds39935c-page 14 ? 2010 microchip technology inc. 2.7.1 spi when enabled, the spi interface is implemented with four pins: cs so si sck all four of these pins must be connected to use the spi interface. the cs , si and sck input pins are 5v tolerant. the so pin is also 5v tolerant when in a high-impedance state. so is always high-impedance when cs is connected to logic high (i.e., chip not selected). when the spi interface is enabled, all psp interface pins (except pspcfg2 and pspcfg3 on enc624j600 devices) are unused. they are placed in a high-impedance state and their input buffers are dis- abled. for best esd performance, it is recommended that the unused psp pins be tied to either v ss or v dd . however, these pins may be left floating if it is desirable for board level layout and routing reasons. when using an enc624j600 device in spi mode, it is recommended that the pspcfg2 and pspcfg3 pins be tied to either v ss or any logic high voltage, and not be left floating. the particular state used is unimportant. 2.7.2 psp depending on the particular device, the psp interface is implemented with up to 34 pins. the interface is highly configurable to accommodate many different parallel interfaces; not all available pins are used in every configuration. up to 8 different operating modes are available. these are explained in detail in section 5.0 parallel slave port interface (psp) . the pspcfg pins control which parallel interface mode is used. the values on these pins are latched upon device power-up in the same manner as the spisel pin. the combinations of v dd and v ss volt- ages on the different pspcfg mode pins determine the psp mode according to table 2-1. on enc424j600 devices, only psp modes 5 and 6 (8-bit width, multiplexed data and address) are available. the mode is selected by applying v ss or v dd , respectively, to pspcfg0. on enc624j600 devices, all eight psp modes are available and are selected by connecting the pspcfg<4:1> pins directly to v dd or ground. the mode selection is encoded such that the multiplexed pin functions, ad14 (on pspcfg1) and sck/al (on pspcfg4), are used only in the dont care positions. therefore, pull-up/pull-down resistors are not required for these pins. all psp pins, except for ad<15:0>, are inputs to the enc624j600 family device and are 5v tolerant. the ad<15:0> pins are bidirectional i/os and are 5v tolerant in input mode. the pins are always inputs when the cs signal is low (chip not selected). any unused psp pins are placed in a high-impedance state. however, it is recommended that they be tied to either vss or a logic high voltage and not be left floating. table 2-1: psp mode selection for enc424j600/624j600 devices interface mode int /spisel pspcfg pins used 01234 44-pin psp mode 5 pull down 0 al, cs, rd, wr, ad<14:0> psp mode 6 pull down 1 al, cs, rw , en, ad<14:0> 64-pin psp mode 1 pull down x000 cs, rd, wr, a14:a0, ad<7:0> psp mode 2 pull down x001 cs, rw , en, a14:a0, ad<7:0> psp mode 3 pull down x100 cs, rd, wrl, wrh, a<13:0>, ad<15:0> psp mode 4 pull down x101 cs, rw , b0sel, b1sel, a<13:0>, ad<15:0> psp mode 5 pull down 001x al, cs, rd, wr, ad<14:0> psp mode 6 pull down 101x al, cs, rw , en, ad<14:0> psp mode 9 pull down 011x al, cs, rd, wrl, wrh, ad<15:0> psp mode 10 pull down 111x al, cs, rw , b0sel, b1sel, ad<15:0> legend: x = dont care, 0 = logic low (tied to v ss ), 1 = logic high (tied to v dd ), = pin not present downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 15 enc424j600/624j600 2.7.3 cs /cs pin the chip select functions for the serial and parallel interfaces are shared on one common pin, cs /cs. this pin is equipped with both internal weak pull-up and weak pull-down resistors. if the spi interface is selected (cs ), the pull-up resistor is automatically enabled and the pull-down resistor is disabled. if the psp interface is chosen (cs), the pull-down resistor is automatically enabled and the pull-up resistor is disabled. this allows the cs /cs pin to stay in the unselected state when not being driven, avoiding the need for an external board level resistor on this pin. when enabled by using spi mode, the internal weak pull-up only pulls the cs /cs pin up to approximately v dd -1.1v or around 2.2v at typical conditions without any loading; it does not pull all the way to v dd . when using the psp interface, the pull-down will be enabled, which is capable of pulling all the way to v ss when unloaded. 2.8 digital i/o levels all digital output pins on enc424j600/624j600 devices contain cmos output drivers that are capable of sinking and sourcing up to 18 ma continuously. all digital inputs and i/o pins operating as inputs are 5v tolerant. these features generally mean that the encx24j600 can connect directly to the host microcontroller without the need of any glue logic. however, some consideration may be necessary when interfacing with 5v systems. since the digital outputs drive only up to the v dd voltage (3.3v nominally), the voltage may not be high enough to ensure a logical high is detected by 5v systems which have high input thresholds. in such cases, unidirectional level translation from the 3.3v encx24j600 up to the 5v host microcontroller may be needed. when using the spi interface, an economical 74hct08 (quad and gate), 74act125 (quad 3-state buffer) or other 5v cmos chip with ttl level input buffers may be used to provide the necessary level shifting. the use of 3-state buffers permits easy integration into systems which share the spi bus with other devices. however, users must make certain that the propaga- tion delay of the level translator does not reduce the maximum spi frequency below desired levels. figure 2-10 and figure 2-11 show two example translation schemes. when using the psp interface, eight, or all sixteen of the adx pins, may need level translation when perform- ing read operations on the encx24j600. the 8-bit 74act245 or 16-bit 74act16245 bus transceiver, or similar devices, may be useful in these situations. figure 2-10: level shifting on the spi interface using and gates figure 2-11: level shifting on the spi interface using 3-state buffers i/o sck sdo sdi intx mcu cs scksi so int /spisel encx24j600 clkout osc1 3.3v 100 ? k ? i/o sck sdo sdi intx mcu cs scksi so int /spisel encx24j600 clkout osc1 3.3v 100 ? k ? downloaded from: http:///
enc424j600/624j600 ds39935c-page 16 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 17 enc424j600/624j600 3.0 memory organization all memory in enc424j600/624j600 devices is implemented as volatile ram. functionally, there are four unique memories: special function registers (sfrs) phy special function registers cryptographic data memory sram buffer the sfrs configure, control and provide status information for most of the device. they are directly accessible through the i/o interface. the phy sfrs configure, control and provide status information for the phy module. they are located inside the phy module and isolated from all other normal sfrs, so they are not directly accessible through the i/o interface. the cryptography data memory is used to store key and data material for the modular exponentiation, aes and md5/sha-1 hashing engines. this memory area can only be accessed through the dma module. the sram buffer is a bulk 12k x 16-bit (24 kbyte) ram array used for tx and rx packet buffering, as well as general purpose storage by the host microcontroller. although the sram uses a 16-bit word, it is byte-writable. this memory is indirectly accessible through pointers on all i/o interfaces. it can also be accessed directly through the psp interfaces. 3.1 i/o interface and memory map depending on the i/o interface selected, the four memories are arranged into two or three different memory address spaces. when the serial interface is selected, the memories are grouped into three address spaces. when one of the parallel interfaces is selected, they are arranged into two address spaces. in all cases, the phy sfrs reside in their own memory address space. 3.1.1 spi interface map when the spi interface is selected, the device memory map is comprised of three memory address spaces (figure ): the sfr area the main memory area the phy register area the sfr area is directly accessible to the user. this is a linear memory space that is 160 bytes long. for efficiency, the sfr area can be addressed as four banks of 32 bytes each, starting at the beginning of the space (00h), with an additional unbanked area of 32 bytes at the end of the sfr memory. banked addressing allows sfrs to be addressed with fewer address bits being exchanged over the serial interface for each transaction. this decreases protocol overhead and enhances performance. sfrs can also be directly addressed by their 8-bit unbanked addresses using unbanked spi commands. this allows for a simpler interface whenever transaction overhead is not critical. the main memory area is organized as a linear, byte-addressable space of 32 kbytes. of this, the first 24-kbyte area (0000h through 5fffh) is implemented as the sram buffer. the buffer is accessed by the device using several sfrs as memory pointers and virtual data window registers, as described in section 3.5.5 indirect sram buffer access . addresses in the main memory area, between 7800h and 7c4fh, are mapped to the memory for the crypto- graphic data modules. these addresses are not directly accessible through the spi interface; they can only be accessed through the dma. the phy sfrs are the final memory space. this is a linear, word-addressable memory space of 32 words. this area is only accessible by the miim interface (see section 3.3 phy special function registers for more details). figure 3-1: enc424j600/624j600 memory map with spi interface 0000h 5fffh 00h sram buffer unimplemented 7800h 7c4fh bank 0 bank 1 bank 2 bank 3 unbanked (inaccessible using banked opcodes) 1fh 20h 3fh 40h 5fh 60h 7fh 80h 9fh 00h 1fh 00h 1fh 00h 1fh 00h 1fh cryptographic data (dma access only) unimplemented 7fffh 16-bit, miim access only 00h 1fh phy register miregadr banked opcodes unbanked opcodes pointers sfr area main area area downloaded from: http:///
enc424j600/624j600 ds39935c-page 18 ? 2010 microchip technology inc. 3.1.2 psp interface maps when one of the parallel interfaces is selected, the memory map is very different from the spi map. there are two different memory address spaces (figure 3-2): the main memory area the phy register area as in the serial memory map, the main memory area is a linear, byte-addressable space of 32 kbytes, with the sram buffer located in the first 24-kbyte region. the cryptographic data memory is also mapped to the same location as in the serial memory map. the main differ- ence is that the sfrs are now located to an area with a higher address than the cryp tographic data space. addi- tional memory areas above the sfrs are reserved for their accompanying bit set and bit clear registers. except for the cryptographic data memory, all addresses in the main memory area are directly accessible using the psp bus. as with the serial inter- face, the cryptographic memory can only be accessed through the dma. the difference between the 8-bit and 16-bit interfaces is how the sram buffer is addressed by the external address bus. in 16-bit data modes, the address bus treats the buffer as a 16-byte wide, word-addressable space, spanning 000h to 3fffh. in 8-bit data modes, the address bus treats the buffer as an 8-bit, byte-address- able space, ranging from 0000h to 7fffh. in either case, the sfrs used as memory pointers still address the buffer as a byte-wide, byte-addressable space. the phy sfr space is implemented in the same manner as the spi interface described above. in both 8-bit and 16-bit psp modes, full device func- tionality can be realized without using the full width of the address bus. this is because the sram buffer can still be read and written to by using sfr pointers. in practical terms, this can allow designers in space or pin constrained applications to only connect a subset of the a or ad address pins to the host microcontroller. for example, in the 8-bit multiplexed psp modes 5 or 6, tying pins, ad<14:9> to v dd , still allows direct address access to all sfrs. this reduces the number of pins required for connection to the host controller, including the interface control pins to 12 or 13. figure 3-2: enc424j600/624j600 memory maps for psp interfaces (1) 0000h 2fffh sram buffer unimplemented cryptographic data (dma access only) 3f00h unimplemented special function registers (r/w) 3f4fh 0000h 5fffh 7800h (2) 7c4fh (2) psp address bus (word address) pointers (byte address) 16-bit, miim access only 00h 1fh phy register area miregadr 3f80h sfr bit set registers 3fbfh 3fc0h sfr bit clear registers 3fffh 16-bit, miim access only 00h 1fh phy register area miregadr 0000h 5fffh sram buffer unimplemented 7800h (2) 7c4fh (2) cryptographic data (dma access only) 7e00h unimplemented special function registers (r/w) 7e9fh psp address bus and all pointers 7f00h sfr bit set registers 7f7fh 7f80h sfr bit clear registers 7fffh main area main area 8-bit psp 16-bit psp note 1: memory areas not shown to scale. 2: addresses in this range are accessible only thr ough internal address pointers of the dma module. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 19 enc424j600/624j600 3.2 special function registers the sfrs provide the main interface between the host controller and the on-chip ethernet controller logic. writing to these registers controls the operation of the interface, while reading the registers allows the host controller to monitor operations. all registers are 16 bits wide. on the spi and 8-bit psp interfaces, which are inherently byte-oriented, the registers are split into separate high and low locations which are designated by an h or l suffix, respec- tively. all registers are organized in little-endian format such that the low byte is always at the lower memory address. some of the available addresses are unimplemented or marked as reserved. these locations should not be written to. data read from reserved locations should be ignored. reading from unimplemented locations will return 0 . when reading and writing to registers which contain reserved bits, any rules stated in the register definition should be observed. the addresses of all user-accessible registers are provided in tables 3-1 through 3-6. a complete bit level listing of the sfrs is presented in table 3-7 (page 26). 3.2.1 e registers sfrs with names starting with e are the primary control and pointer registers. they configure and con- trol all of the (non-mac) top-level features of the device, as well as manipulate the pointers that define the memory buffers. these registers can be read and written in any order, with any length, without concern for address alignment. 3.2.2 mac registers sfrs with names that start with ma or mi are implemented in the mac module hardware. for this reason, their operation differs from e registers in two ways. first, mac registers support read and write operations only. individual bit set and bit clear operations cannot be performed. additionally, mac registers must always be written as a 16-bit word, regardless of the i/o interface being used. that is, on the spi or 8-bit psp interfaces, all write operations must be performed by writing to the low byte, followed by a write to the associated high byte. on 16-bit psp interfaces, both write enables or byte selects must be asserted to perform the 16-bit write. non-sequential writes, such as writing to the low byte of one mac register, the low byte of a second mac register and then the high byte of the first register cannot be performed. 3.2.3 spi register map as previously described, the sfr memory is partitioned into four banks plus a special region that is not bank addressable. each bank is 32 bytes long and addressed by a 5-bit address value. all sfr memory may also be accessed via unbanked spi opcodes which use a full 8-bit address to form a linear address map without banking. the last 10 bytes (16h to 1fh) of all spi banks point to a common set of five registers: eudast, eudand, estat, eir and econ1. these are key registers used in controlling and monitoring the operation of the device. their common banked addresses allow easy access without switching the bank. the spi interface implements a comprehensive instruction set that allows for reading and writing of registers, as well as setting and clearing individual bits or bit fields within registers. the spi instruction set is explained in detail in section 4.0 serial peripheral interface (spi) . the sfr map for the spi interface is shown in table 3-1. registers are presented by a bank. the banked (5-bit) address applicable to the registers in each row is shown in the left most column. the unbanked (8-bit) address for each register is shown to the immediate left of the register name. note: sfrs in the unbanked region (80h through 9fh) cannot be accessed using banked addressing. the use of an unbanked sfr opcode is required to perform operations on these registers. downloaded from: http:///
enc424j600/624j600 ds39935c-page 20 ? 2010 microchip technology inc. table 3-1: enc424j600/624j600 sfr map (spi interface) banked register addresses bank 0 (00h offset) bank 1 (20h offset) bank 2 (40h offset) bank 3 (60h offset) unbanked (1) (80h offset) unbanked address name unbanked address name unbanked address name unbanked address name unbanked address name 00 00 etxstl 20 eht1l 40 macon1l 60 maadr3l 80 egpdata (2) 01 01 etxsth 21 eht1h 41 macon1h 61 maadr3h 81 reserved 02 02 etxlenl 22 eht2l 42 macon2l 62 maadr2l 82 erxdata (2) 03 03 etxlenh 23 eht2h 43 macon2h 63 maadr2h 83 reserved 04 04 erxstl 24 eht3l 44 mabbipgl 64 maadr1l 84 eudadata (2) 05 05 erxsth 25 eht3h 45 mabbipgh 65 maadr1h 85 reserved 06 06 erxtaill 26 eht4l 46 maipgl 66 miwrl 86 egprdptl 07 07 erxtailh 27 eht4h 47 maipgh 67 miwrh 87 egprdpth 08 08 erxheadl 28 epmm1l 48 maclconl 68 mirdl 88 egpwrptl 09 09 erxheadh 29 epmm1h 49 maclconh 69 mirdh 89 egpwrpth 0a 0a edmastl 2a epmm2l 4a mamxfll 6a mistatl 8a erxrdptl 0b 0b edmasth 2b epmm2h 4b mamxflh 6b mistath 8b erxrdpth 0c 0c edmalenl 2c epmm3l 4c reserved 6c epausl 8c erxwrptl 0d 0d edmalenh 2d epmm3h 4d reserved 6d epaush 8d erxwrpth 0e 0e edmadstl 2e epmm4l 4e reserved 6e econ2l 8e eudardptl 0f 0f edmadsth 2f epmm4h 4f reserved 6f econ2h 8f eudardpth 10 10 edmacsl 30 epmcsl 50 reserved 70 erxwml 90 eudawrptl 11 11 edmacsh 31 epmcsh 51 reserved 71 erxwmh 91 eudawrpth 12 12 etxstatl 32 epmol 52 micmdl 72 eiel 92 reserved 13 13 etxstath 33 epmoh 53 micmdh 73 eieh 93 reserved 14 14 etxwirel 34 erxfconl 54 miregadrl 74 eidledl 94 reserved 15 15 etxwireh 35 erxfconh 55 miregadrh 75 eidledh 95 reserved 16 16 eudastl 36 eudastl 56 eudastl 76 eudastl 96 reserved 17 17 eudasth 37 eudasth 57 eudasth 77 eudasth 97 reserved 18 18 eudandl 38 eudandl 58 eudandl 78 eudandl 98 reserved 19 19 eudandh 39 eudandh 59 eudandh 79 eudandh 99 reserved 1a 1a estatl 3a estatl 5a estatl 7a estatl 9a reserved 1b 1b estath 3b estath 5b estath 7b estath 9b reserved 1c 1c eirl 3c eirl 5c eirl 7c eirl 9c reserved 1d 1d eirh 3d eirh 5d eirh 7d eirh 9d reserved 1e 1e econ1l 3e econ1l 5e econ1l 7e econ1l 9e 1f 1f econ1h 3f econ1h 5f econ1h 7f econ1h 9f note 1: unbanked sfrs can be accessed only by unbanked spi opcodes. 2: when using these registers to access the sram buffer, use only the n-byte sram instructions. see section 4.6.2 unbanked sfr operations and section 4.6.3 sram buffer operations for more details. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 21 enc424j600/624j600 3.2.4 psp register map when using a psp interface, the sfr memory is linear; all registers are directly accessible without banking. to maintain consistency with the spi interface, the eudast, eudand, estat, eir and econ1 registers are instantiated in four locations in the psp memory maps. users may opt to use any one of these four locations. the sfr maps for the 8-bit and 16-bit psp interfaces are shown in table 3-2 and table 3-3, respectively. table 3-2: enc424j600/624j600 sfr map (base register map, 8-bit psp interface) addr name addr name addr name addr name addr name 7e00 etxstl 7e20 eht1l 7e40 macon1l 7e60 maadr3l 7e80 egpdata 7e01 etxsth 7e21 eht1h 7e41 macon1h 7e61 maadr3h 7e81 reserved 7e02 etxlenl 7e22 eht2l 7e42 macon2l 7e62 maadr2l 7e82 erxdata 7e03 etxlenh 7e23 eht2h 7e43 macon2h 7e63 maadr2h 7e83 reserved 7e04 erxstl 7e24 eht3l 7e44 mabbipgl 7e64 maadr1l 7e84 eudadata 7e05 erxsth 7e25 eht3h 7e45 mabbipgh 7e65 maadr1h 7e85 reserved 7e06 erxtaill 7e26 eht4l 7e46 maipgl 7e66 miwrl 7e86 egprdptl 7e07 erxtailh 7e27 eht4h 7e47 maipgh 7e67 miwrh 7e87 egprdpth 7e08 erxheadl 7e28 epmm1l 7e48 maclconl 7e68 mirdl 7e88 egpwrptl 7e09 erxheadh 7e29 epmm1h 7e49 maclconh 7e69 mirdh 7e89 egpwrpth 7e0a edmastl 7e2a epmm2l 7e4a mamxfll 7e6a mistatl 7e8a erxrdptl 7e0b edmasth 7e2b epmm2h 7e4b mamxflh 7e6b mistath 7e8b erxrdpth 7e0c edmalenl 7e2c epmm3l 7e4c reserved 7e6c epausl 7e8c erxwrptl 7e0d edmalenh 7e2d epmm3h 7e4d reserved 7e6d epaush 7e8d erxwrpth 7e0e edmadstl 7e2e epmm4l 7e4e reserved 7e6e econ2l 7e8e eudardptl 7e0f edmadsth 7e2f epmm4h 7e4f reserved 7e6f econ2h 7e8f eudardpth 7e10 edmacsl 7e30 epmcsl 7e50 reserved 7e70 erxwml 7e90 eudawrptl 7e11 edmacsh 7e31 epmcsh 7e51 reserved 7e71 erxwmh 7e91 eudawrpth 7e12 etxstatl 7e32 epmol 7e52 micmdl 7e72 eiel 7e92 reserved 7e13 etxstath 7e33 epmoh 7e53 micmdh 7e73 eieh 7e93 reserved 7e14 etxwirel 7e34 erxfconl 7e54 miregadrl 7e74 eidledl 7e94 reserved 7e15 etxwireh 7e35 erxfconh 7e55 miregadrh 7e75 eidledh 7e95 reserved 7e16 eudastl 7e36 eudastl 7e56 eudastl 7e76 eudastl 7e96 reserved 7e17 eudasth 7e37 eudasth 7e57 eudasth 7e77 eudasth 7e97 reserved 7e18 eudandl 7e38 eudandl 7e58 eudandl 7e78 eudandl 7e98 reserved 7e19 eudandh 7e39 eudandh 7e59 eudandh 7e79 eudandh 7e99 reserved 7e1a estatl 7e3a estatl 7e5a estatl 7e7a estatl 7e9a reserved 7e1b estath 7e3b estath 7e5b estath 7e7b estath 7e9b reserved 7e1c eirl 7e3c eirl 7e5c eirl 7e7c eirl 7e9c reserved 7e1d eirh 7e3d eirh 7e5d eirh 7e7d eirh 7e9d reserved 7e1e econ1l 7e3e econ1l 7e5e econ1l 7e7e econ1l 7e9e 7e1f econ1h 7e3f econ1h 7e5f econ1h 7e7f econ1h 7e9f downloaded from: http:///
enc424j600/624j600 ds39935c-page 22 ? 2010 microchip technology inc. table 3-3: enc424j600/624j600 sfr map (base register map, 16-bit psp interface) 3.2.4.1 psp bit set and bit clear registers a major difference between the spi and psp memory maps is the inclusion of companion bit set and bit clear registers for many of the e registers. since the psp interface allows direct access to memory locations, without a command interpreter, there are no instructions implemented to perform single bit manipulations. instead, this interface implements separate bit set and bit clear registers, allowing users to individually work with volatile bits (such as interrupt flags) without the risk of disturbing the values of other bits. setting the bit(s) in one of these registers sets or clears the corresponding bit(s) in the base register. in the psp interface, bit set and bit clear registers are located in different areas of the addressable memory space from their corresponding base sfrs. the address of the registers is always at a fixed offset from their corresponding base register. for the 8-bit interface, the offset is 100h (set) or 180h (clear). for the 16-bit interface, the offset is 80h (set) or c0 (clear). symbolically, the names of the companion registers are the names of the base registers, plus the suffix form -set (or -seth/setl) for bit set registers and -clr (-clrh/clrl) for bit clear registers. most sfrs have their own pair of bit set and bit clear registers. however, these sfrs do not: mac registers, including mi registers for phy access read-only status registers (erxhead, etxstat, etxwire and estat) all of the sram buffer pointers and data windows (sfrs located at 7e80h to 7e9fh in the 8-bit interface, or 3f40h to 3f4fh in the 16-bit interface) the bit set and bit clear registers for the 8-bit psp interface are listed in table 3-4 and table 3-5, respectively. the registers for the 16-bit interface are listed together in table 3-6. addr name addr name addr name addr name addr name 3f00 etxst 3f10 eht1 3f20 macon1 3f30 maadr3 3f40 egpdata 3f01 etxlen 3f11 eht2 3f21 macon2 3f31 maadr2 3f41 erxdata 3f02 erxst 3f12 eht3 3f22 mabbipg 3f32 maadr1 3f42 eudadata 3f03 erxtail 3f13 eht4 3f23 maipg 3f33 miwr 3f43 egprdpt 3f04 erxhead 3f14 epmm1 3f24 maclcon 3f34 mird 3f44 egpwrpt 3f05 edmast 3f15 epmm2 3f25 mamxfl 3f35 mistat 3f45 erxrdpt 3f06 edmalen 3f16 epmm3 3f26 reserved 3f36 epaus 3f46 erxwrpt 3f07 edmadst 3f17 epmm4 3f27 reserved 3f37 econ2 3f47 eudardpt 3f08 edmacs 3f18 epmcs 3f28 reserved 3f38 erxwm 3f48 eudawrpt 3f09 etxstat 3f19 epmo 3f29 micmd 3f39 eie 3f49 reserved 3f0a etxwire 3f1a erxfcon 3f2a miregadr 3f3a eidled 3f4a reserved 3f0b eudast 3f1b eudast 3f2b eudast 3f3b eudast 3f4b reserved 3f0c eudand 3f1c eudand 3f2c eudand 3f3c eudand 3f4c reserved 3f0d estat 3f1d estat 3f2d estat 3f3d estat 3f4d reserved 3f0e eir 3f1e eir 3f2e eir 3f3e eir 3f4e reserved 3f0f econ1 3f1f econ1 3f2f econ1 3f3f econ1 3f4f downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 23 enc424j600/624j600 table 3-4: enc424j600/624j600 sfr map (set register map, 8-bit psp interface) bit set registers (7f00h to 7f7fh) (1) addr name addr name addr name addr name 7f00 etxstsetl 7f20 eht1setl 7f40 reserved 7f60 reserved 7f01 etxstseth 7f21 eht1seth 7f41 reserved 7f61 reserved 7f02 etxlensetl 7f22 eht2setl 7f42 reserved 7f62 reserved 7f03 etxlenseth 7f23 eht2seth 7f43 reserved 7f63 reserved 7f04 erxstsetl 7f24 eht3setl 7f44 reserved 7f64 reserved 7f05 erxstseth 7f25 eht3seth 7f45 reserved 7f65 reserved 7f06 erxtailsetl 7f26 eht4setl 7f46 reserved 7f66 reserved 7f07 erxtailseth 7f27 eht4seth 7f47 reserved 7f67 reserved 7f08 7f28 epmm1setl 7f48 reserved 7f68 reserved 7f09 7f29 epmm1seth 7f49 reserved 7f69 reserved 7f0a edmastsetl 7f2a epmm2setl 7f4a reserved 7f6a reserved 7f0b edmastseth 7f2b epmm2seth 7f4b reserved 7f6b reserved 7f0c edmalensetl 7f2c epmm3setl 7f4c reserved 7f6c epaussetl 7f0d edmalenseth 7f2d epmm3seth 7f4d reserved 7f6d epausseth 7f0e edmadstsetl 7f2e epmm4setl 7f4e reserved 7f6e econ2setl 7f0f edmadstseth 7f2f epmm4seth 7f4f reserved 7f6f econ2seth 7f10 edmacssetl 7f30 epmcssetl 7f50 reserved 7f70 erxwmsetl 7f11 edmacsseth 7f31 epmcsseth 7f51 reserved 7f71 erxwmseth 7f12 7f32 epmosetl 7f52 reserved 7f72 eiesetl 7f13 7f33 epmoseth 7f53 reserved 7f73 eieseth 7f14 7f34 erxfconsetl 7f54 reserved 7f74 eidledsetl 7f15 7f35 erxfconseth 7f55 reserved 7f75 eidledseth 7f16 eudastsetl 7f36 eudastsetl 7f56 eudastsetl 7f76 eudastsetl 7f17 eudastseth 7f37 eudastseth 7f57 eudastseth 7f77 eudastseth 7f18 eudandsetl 7f38 eudandsetl 7f58 eudandsetl 7f78 eudandsetl 7f19 eudandseth 7f39 eudandseth 7f59 eudandseth 7f79 eudandseth 7f1a 7 f 3 a 7 f 5 a 7 f 7 a 7f1b 7 f 3 b 7 f 5 b 7 f 7 b 7f1c eirsetl 7f3c eirsetl 7f5c eirsetl 7f7c eirsetl 7f1d eirseth 7f3d eirseth 7f5d eirseth 7f7d eirseth 7f1e econ1setl 7f3e econ1setl 7f5e econ1setl 7f7e econ1setl 7f1f econ1seth 7f3f econ1seth 7f5f econ1seth 7f7f econ1seth note 1: bit set and bit clear registers are not implemented for the base sfrs located between 7e80h and 7e9fh. downloaded from: http:///
enc424j600/624j600 ds39935c-page 24 ? 2010 microchip technology inc. table 3-5: enc424j600/624j600 sfr map (clr register map, 8-bit psp interface) bit clear registers (7f80h to 7fffh) (1) addr name addr name addr name addr name 7f80 etxstclrl 7fa0 eht1clrl 7fc0 reserved 7fe0 reserved 7f81 etxstclrh 7fa1 eht1clrh 7fc1 reserved 7fe1 reserved 7f82 etxlenclrl 7fa2 eht2clrl 7fc2 reserved 7fe2 reserved 7f83 etxlenclrh 7fa3 eht2clrh 7fc3 reserved 7fe3 reserved 7f84 erxstclrl 7fa4 eht3clrl 7fc4 reserved 7fe4 reserved 7f85 erxstclrh 7fa5 eht3clrh 7fc5 reserved 7fe5 reserved 7f86 erxtailclrl 7fa6 eht4clrl 7fc6 reserved 7fe6 reserved 7f87 erxtailclrh 7fa7 eht4clrh 7fc7 reserved 7fe7 reserved 7f88 7fa8 epmm1clrl 7fc8 reserved 7fe8 reserved 7f89 7fa9 epmm1clrh 7fc9 reserved 7fe9 reserved 7f8a edmastclrl 7faa epmm2clrl 7fca reserved 7fea reserved 7f8b edmastclrh 7fab epmm2clrh 7fcb reserved 7feb reserved 7f8c edmalenclrl 7fac epmm3clrl 7fcc reserved 7fec epausclrl 7f8d edmalenclrh 7fad epmm3clrh 7fcd reserved 7fed epausclrh 7f8e edmadstclrl 7fae epmm4clrl 7fce reserved 7fee econ2clrl 7f8f edmadstclrh 7faf epmm4clrh 7fcf reserved 7fef econ2clrh 7f90 edmacsclrl 7fb0 epmcsclrl 7fd0 reserved 7ff0 erxwmclrl 7f91 edmacsclrh 7fb1 epmcsclrh 7fd1 reserved 7ff1 erxwmclrh 7f92 7fb2 epmoclrl 7fd2 reserved 7ff2 eieclrl 7f93 7fb3 epmoclrh 7fd3 reserved 7ff3 eieclrh 7f94 7fb4 erxfconclrl 7fd4 reserved 7ff4 eidledclrl 7f95 7fb5 erxfconclrh 7fd5 reserved 7ff5 eidledclrh 7f96 eudastclrl 7fb6 eudastclrl 7fd6 eudastclrl 7ff6 eudastclrl 7f97 eudastclrh 7fb7 eudastclrh 7fd7 eudastclrh 7ff7 eudastclrh 7f98 eudandclrl 7fb8 eudandclrl 7fd8 eudandclrl 7ff8 eudandclrl 7f99 eudandclrh 7fb9 eudandclrh 7fd9 eudandclrh 7ff9 eudandclrh 7f9a 7 f b a 7 f d a 7 f f a 7f9b 7 f b b 7 f d b 7ffb 7f9c eirclrl 7fbc eirclrl 7fdc eirclrl 7ffc eirclrl 7f9d eirclrh 7fbd eirclrh 7fdd eirclrh 7ffd eirclrh 7f9e econ1clrl 7fbe econ1clrl 7fde econ1clrl 7ffe econ1clrl 7f9f econ1clrh 7fbf econ1clrh 7fdf econ1clrh 7fff econ1clrh note 1: bit set and bit clear registers are not implemented for the base sfrs located between 7e80h and 7e9fh. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 25 enc424j600/624j600 table 3-6: enc424j600/624j600 sfr map (set/clr register map, 16-bit psp interface) bit set registers (3f80h to 3fbfh) (1) addr name addr name addr name addr name 3f80 etxstset 3f90 eht1set 3fa0 reserved 3fb0 reserved 3f81 etxlenset 3f91 eht2set 3fa1 reserved 3fb1 reserved 3f82 erxstset 3f92 eht3set 3fa2 reserved 3fb2 reserved 3f83 erxtailset 3f93 eht4set 3fa3 reserved 3fb3 reserved 3f84 3f94 epmm1set 3fa4 reserved 3fb4 reserved 3f85 edmastset 3f95 epmm2set 3fa5 reserved 3fb5 reserved 3f86 edmalenset 3f96 epmm3set 3fa6 reserved 3fb6 epausset 3f87 edmadstset 3f97 epmm4set 3fa7 reserved 3fb7 econ2set 3f88 edmacsset 3f98 epmcsset 3fa8 reserved 3fb8 erxwmset 3f89 3f99 epmoset 3fa9 reserved 3fb9 eieset 3f8a 3f9a erxfcon 3faa reserved 3fba eidledset 3f8b eudastset 3f9b eudastset 3fab eudastset 3fbb eudastset 3f8c eudandset 3f9c eudandset 3fac eudandset 3fbc eudandset 3f8d 3 f 9 d 3 f a d 3 f b d 3f8e eirset 3f9e eirset 3fae eirset 3fbe eirset 3f8f econ1set 3f9f econ1set 3faf econ1set 3fbf econ1set bit clear registers (3fc0h to 3fffh) (1) addr name addr name addr name addr name 3fc0 etxstclr 3fd0 eht1clr 3fe0 reserved 3ff0 reserved 3fc1 etxlenclr 3fd1 eht2clr 3fe1 reserved 3ff1 reserved 3fc2 erxstclr 3fd2 eht3clr 3fe2 reserved 3ff2 reserved 3fc3 erxtailclr 3fd3 eht4clr 3fe3 reserved 3ff3 reserved 3fc4 3fd4 epmm1clr 3fe4 reserved 3ff4 reserved 3fc5 edmastclr 3fd5 epmm2clr 3fe5 reserved 3ff5 reserved 3fc6 edmalenclr 3fd6 epmm3clr 3fe6 reserved 3ff6 epausclr 3fc7 edmadstclr 3fd7 epmm4clr 3fe7 reserved 3ff7 econ2clr 3fc8 edmacsclr 3fd8 epmcsclr 3fe8 reserved 3ff8 erxwmclr 3fc9 3fd9 epmoclr 3fe9 reserved 3ff9 eieclr 3fca 3fda erxfconclr 3fea reserved 3ffa eidledclr 3fcb eudastclr 3fdb eudastclr 3feb eudastclr 3ffb eudastclr 3fcc eudandclr 3fdc eudandclr 3fec eudandclr 3ffc eudandclr 3fcd 3 f d d 3 f e d 3 f f d 3fce eirclr 3fde eirclr 3fee eirclr 3ffe eirclr 3fcf econ1clr 3fdf econ1clr 3fef econ1clr 3fff econ1clr note 1: bit set and bit clear registers are not implemented for the base sfrs located between 3f40h and 3f4fh. downloaded from: http:///
enc424j600/624j600 ds39935c-page 26 ? 2010 microchip technology inc. table 3-7: enc424j600/624j600 register file summary file name 8-bit high byte (h register) low byte (l register) reset bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 16-bit bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 eudast user-defined area start pointer (eudast<14:8>) user-defined are a start pointer (eudast<7:0>) 00, 00 eudand user-defined area end pointer (eudand<14:8>) user-defined area end poin ter (eudand<7:0>) 5f, ff estat int fcidle rxbusy clkrdy r phydpx r phylnk pktcnt7 pktcnt6 pktcnt5 pktcnt4 pktcnt3 pktcnt2 pktcnt1 pktcnt0 00, 00 eir crypten modexif hashif aesif linkif r r r r pktif dmaif r txif txabtif rxabtif pcfulif 0a, 00 econ1 modexst hashen hashop hashlst aesst aesop1 aesop0 pktdec fcop1 fcop0 dmast dmacpy dmacssd dmanocs txrts rxen 00, 00 etxst tx start address (etxst<14:8>) tx start address (etxst<7:0>) 00, 00 etxlen tx length (etxlen<14:8>) tx length (etxlen<7:0>) 00, 00 erxst rx buffer start address (erxst<14:8>) rx buffer start address (erxst<7:0>) 53, 40 erxtail rx tail pointer (erxtail<14:8>) rx tail pointer (erxtail<7:0>) 5f, fe erxhead rx head pointer (erxhead<14:8>) rx head pointer (erxhead<7:0>) 53, 40 edmast dma start address (edmast<14:8>) dma start address (edmast<7:0>) 00, 00 edmalen dma length (edmalen<14:8>) dma length (edmalen<7:0>) 00, 00 edmadst dma destination address (edmadst<14:8>) dma destination address (edmadst<7:0>) 00, 00 edmacs dma checksum, high byte (edmacs<15:8>) dma checksum, low byte (edmacs<7:0>) 00, 00 etxstat r r latecol maxcol exdefer defer r r crcbad colcnt3 colcnt2 colcnt1 colcnt0 00, 00 etxwire transmit byte count on wire (including collision bytes), high byte (etxwire<15:8>) transmit byte count on wire (including collision bytes), low byte (etxwire<7:0>) 00, 00 eht1 hash table filter (eht1<15:8>) hash table filter (eht1<7:0>) 00, 00 eht2 hash table filter (eht2<31:24>) hash table filter (eht2<23:16>) 00, 00 eth3 hash table filter (eht3<47:40>) hash table filter (eht3<39:32>) 00, 00 eth4 hash table filter (eht4<63:56>) hash table filter (eht4<55:48>) 00, 00 epmm1 pattern match filter mask (epmm1<15:8>) pattern match filter mask (epmm1<7:0>) 00, 00 epmm2 pattern match filter mask (epmm2<15:8>) pattern match filter mask (epmm2<7:0>) 00, 00 epmm3 pattern match filter mask (epmm3<15:8>) pattern match filter mask (epmm3<7:0>) 00, 00 epmm4 pattern match filter mask (epmm4<15:8>) pattern match filter mask (epmm4<7:0>) 00, 00 epmcs pattern match filter checksum, high byte (epmcs<15:8>) pattern match filter checksum, low byte (epmcs<7:0>) 00, 00 erxfcon hten mpen notpm pmen3 pmen2 pmen1 pmen0 crceen crcen runteen runten ucen notmeen mcen bcen 00, 59 epmo pattern match filter offset, high byte (epmo<15:8>) pattern match filter offset, low byte (epmo<7:0>) 00, 00 macon1 r r r r r r loopbk r rxpaus passall r x0, 0d macon2 defer bpen nobkoff r r padcfg2 padcfg1 padcfg0 txcrcen phdren hfrmen r fuldpx 40, b2 mabbipg bbipg6 bbipg5 bbipg4 bbipg3 bbipg2 bbipg1 bbipg0 00, 12 maipg r r r r r r r ipg6 ipg5 ipg4 ipg3 ipg2 ipg1 ipg0 0c, 12 maclcon r r r r r r maxret3 maxret2 maxret1 maxret0 37, 0f mamxfl mac maximum frame length, high byte (mamxfl<15:8>) mac maximum frame length, low byte (mamxfl<7:0>) 05, ee legend: = unimplemented, read as 0 ; q = unique mac address or silicon revision nibble; r = reserved bi t, do not modify; x = reset value unknown. reset values are shown in hexadecimal for eac h byte. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 27 enc424j600/624j600 micmd miiscan miird --, 00 miregadr r r r r r phreg4 phreg3 phre g2 phreg1 phreg0 01, 00 maadr3 mac address, byte 6 (maadr<7:0>) mac address, byte 5 (maadr<15:8>) qq, qq maadr2 mac address, byte 4 (maadr<23:16>) mac address, byte 3 (maadr<31:24>)/oui byte 3 qq, a3 maadr1 mac address, byte 2 (maadr<39:32>)/oui byte 2 mac address, byte 1 (maadr<47:40>)/oui byte 1 04, 00 miwr mii management write data, high byte (miwr<15:8>) mii management write data, low byte (miwr<7:0>) 00, 00 mird mii management read data, high byte (mird<15:8>) mii management read data, low byte (mird<7:0>) 00, 00 mistat r nvalid scan busy --, 00 epaus pause timer value, high byte (epaus<15:8>) pause timer value, low byte (epaus<7:0>) 10, 00 econ2 ethen strch txmac sha1md5 cocon3 cocon2 cocon1 cocon0 autofc txrst rxrst ethrst modlen1 m odlen0 aeslen1 aeslen0 cb, 00 erxwm rxfwm7 rxfwm6 rxfwm5 rxfwm4 rxfwm3 rxfwm2 rxfwm1 rxf wm0 rxewm7 rxewm6 rxewm5 rxewm4 rxewm3 rxewm2 rxewm1 rxewm0 10, 0f eie intie modexie hashie aesie linkie r r r r pktie dmaie r txie txabtie rxabtie pcfulie 80, 10 eidled lacfg3 lacfg2 lacfg1 lacfg0 lbcfg3 lbcfg2 lbcfg1 lbcfg0 devid2 devid1 devid0 revid4 revid3 revid2 revid1 revid0 26, qq egpdata r r r r r r r r general purpose data window register --, xx erxdata r r r r r r r r ethernet rx data window register --, xx eudadata r r r r r r r r user-defined area data window register --, xx egprdpt general purpose window read pointer, high byte (etxrdpt<14:8>) gen eral purpose window read pointer, low byte (etxrdpt<7:0>) 05, fa egpwrpt general purpose window write pointer, high byte (etxwrpt<14:8>) gen eral purpose window write pointer, low byte (etxwrpt<7:0>) 00, 00 erxrdpt rx window read pointer, high byte (erxrdpt<14:8>) rx window read pointer, low byte (erxrdpt<7 :0>) 05, fa erxwrpt rx window write pointer, high byte (erxwrpt<14:8>) rx window write po inter, low byte (erxwrpt<7:0>) 00, 00 eudardpt uda window read pointer (eudardpt<14:8>) uda window read pointer (eudardpt<7:0>) 05, fa eudawrpt uda window write pointer (eudawrpt<14:8>) uda window write point er (eudawrpt<7:0>) 00, 00 table 3-7: enc424j600/624j600 register file summary (continued) file name 8-bit high byte (h register) low byte (l register) reset bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 16-bit bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 legend: = unimplemented, read as 0 ; q = unique mac address or silicon revision nibble; r = reserved bi t, do not modify; x = reset value unknown. reset values are shown in hexadecimal for eac h byte. downloaded from: http:///
enc424j600/624j600 ds39935c-page 28 ? 2010 microchip technology inc. 3.3 phy special function registers the phy registers provide configuration and control of the phy module, as well as status information about its operation. these 16-bit registers are located in their own memory space, outside of the main sfr space. unlike other sfrs, the phy sfrs are not directly accessible through the spi or psp interfaces. instead, access is accomplished through a special set of mac control registers that implement a media independent interface management (miim) defined by ieee 802.3; these are the micmd, mistat and miregadr registers. there are a total of 32 phy addresses; however, only 10 locations implement user-accessible registers listed in table 3-8. writes to unimplemented locations are ignored and any attempts to read these locations return ffffh. do not write to reserved phy register locations and ignore their content if read. table 3-8: phy special function register map 3.3.1 reading phy registers when a phy register is read, the entire 16 bits are obtained. to read from a phy register: 1. write the address of the phy register to read from into the miregadr register (register 3-1). make sure to also set reserved bit 8 of this register. 2. set the miird bit (micmd<0>, register 3-2). the read operation begins and the busy bit (mistat<0>, register 3-3) is automatically set by hardware. 3. wait 25.6 ? s. poll the busy (mistat<0>) bit to be certain that the operation is complete. while busy, the host controller should not start any miiscan operations or write to the miwr register. when the mac has obtained the register contents, the busy bit will clear itself. 4. clear the miird (micmd<0>) bit. 5. read the desired data from the mird register. for 8-bit interfaces, the order that these bytes are read is unimportant. 3.3.2 writing phy registers when a phy register is written to, the entire 16 bits are written at once; selective bit writes are not implemented. if it is necessary to reprogram only select bits in the register, the host microcontroller must first read the phy register, modify the resulting data and then write the data back to the phy register. to write to a phy register: 1. write the address of the phy register to write to into the miregadr register. make sure to also set reserved bit 8 of this register. 2. write the 16 bits of data into the miwr register. the low byte must be written first, followed by the high byte. 3. writing to the high byte of miwr begins the miim transaction and the busy (mistat<0>) bit is automatically set by hardware. the phy register is written after the miim operation completes, which takes 25.6 ? s. when the write opera- tion has completed, the busy bit clears itself. the host controller should not start any miiscan, miwr or miird operations while the busy bit is set. address name address name 00 phcon1 10 reserved 01 phstat1 11 phcon2 02 reserved 12 reserved 03 reserved 13 04 phana 14 reserved 05 phanlpa 15 reserved 06 phane 16 reserved 07 1 7 reserved 08 1 8 09 1 9 0a 1 a 0b 1 bp h s t a t 2 0c 1 c reserved 0d 1 d reserved 0e 1e reserved 0f 1f phstat3 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 29 enc424j600/624j600 3.3.3 scanning a phy register the mac can be configured to perform automatic back-to-back read operations on a phy register. this can reduce the host controller complexity when periodic status information updates are desired. to perform the scan operation: 1. write the address of the phy register to read from into the miregadr register. make sure to also set reserved bit 8 of this register. 2. set the miiscan (micmd<1>) bit. the scan operation begins and the busy (mistat<0>) bit is automatically set by hardware. the first read operation will complete after 25.6 ? s. sub- sequent reads will be done at the same interval until the operation is cancelled. the nvalid (mistat<2>) bit may be polled to determine when the first read operation is complete. after setting the miiscan bit, the mird register will automatically be updated every 25.6 ? s. there is no status information which can be used to determine when the mird registers are updated. on the spi or 8-bit psp interfaces, the host controller can only read one register location at a time. therefore, it must not be assumed that the values of mirdl and mirdh were read from the phy at exactly the same time. when the miiscan operation is in progress, the host controller must not attempt to write to miwr or start an miird operation. the miiscan operation can be cancelled by clearing the miiscan (micmd<1>) bit and then polling the busy (mistat<0>) bit. new operations may be started after the busy bit is cleared. register 3-1: miregadr: mii management address register u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r r r r r bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phreg4 phreg3 phreg2 phreg1 phreg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 reserved: write as 00001 (01h) bit 7-5 unimplemented: read as 0 bit 4-0 phreg<4:0>: mii management phy register address select bits the address of the phy register which mii management read and write operations will apply to. downloaded from: http:///
enc424j600/624j600 ds39935c-page 30 ? 2010 microchip technology inc. register 3-2: micmd: mii management command register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 miiscan miird bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-2 unimplemented: read as 0 bit 1 miiscan: mii scan enable bit 1 = phy register designated by miregadr<4:0> is continuously read and the data is copied to mird 0 = no mii management scan operation is in progress bit 0 miird: mii read enable bit 1 = phy register designated by miregadr<4:0> is read once and the data is copied to mird 0 = no mii management read operation is in progress register 3-3: mistat: mii management status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r nvalid scan busy bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 reserved: ignore on read bit 2 nvalid: mii management read data not valid status bit 1 = the contents of mird are not valid yet 0 = the mii management read cycle has completed and mird has been updated bit 1 scan: mii management scan status bit 1 = mii management scan operation is in progress 0 = no mii management scan operation is in progress bit 0 busy: mii management busy status bit 1 = a phy register is currently being read or written to 0 = the mii management interface is idle downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 31 enc424j600/624j600 table 3-9: phy register file summary file name bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on reset phcon1 prst ploopbk spd100 anen psleep r reneg pfuldpx r r r r r r r r 10, 00 phstat1 r full100 half100 full10 half10 r r r r r andone lrfault anable llstat re x t r e g s 78, 09 phana adnp ra d f a u l t r adpaus1 adpaus0 r ad100fd ad100 ad10fd ad10 adieee4 adieee3 adieee2 adieee1 adieee0 01, e1 phanlpa lpnp lpack lpfault r lppaus1 lppaus0 lp100t4 lp100fd lp100 lp10fd lp10 lpieee4 lpieee3 lpieee2 lp ieee1 lpi eee0 xx, xx phane r r r r r r r r r r rp d f l t r rl p a r c dl p a n a b l 00, 00 phcon2 r r edpwrdn r edthres r r r r r r r rf r c l n ke d s t a t r 00, 02 phstat2 r r r r r r r r r r rp l r i t y r r r r xx, 0x phstat3 r r r r r r r r r r r spddpx2 spddpx1 spddpx0 r r 00, 40 legend: r = reserved bit, write as 0 ; ignore on read; x = unknown. reset values are shown in hexadecimal for each byte. downloaded from: http:///
enc424j600/624j600 ds39935c-page 32 ? 2010 microchip technology inc. 3.4 cryptographic data memory the cryptographic data memory is used to store key and data information for the modular exponentiation, aes and md5/sha-1 hashing engines. the ram for these modules is actually implemented inside of the modules themselves; this allows fast memory access for the access-intensive encryption engines, as well as the simultaneous use of more than one module by an application. this memory is mapped into an area of address space that is accessible only by the dma controller. the host controller must write to the crypto- graphic data memory by writing data to the 24-kbyte sram buffer, then using the dma to copy it into the security engine. reading is performed in the opposite order, using the dma to copy the data out of the security engine and into the sram buffer. the mapping of the cryptographic space is shown in figure 3-3. for additional information on the crypto- graphic engines, refer to section 15.0 cryptographic security engines . for additional information on the dma controller, see section 14.0 direct memory access (dma) controller . figure 3-3: cryptographic data memory mapping 3.5 sram buffer the sram buffer is a bulk 12k word x 16-bit (24 kbytes) memory, used for tx/rx packet buffering and general purpose storage by the host microcontroller. in most cases, the memory is accessed using a byte-oriented interface, so the memory can normally be thought of as a simple 24-kbyte memory buffer divided into a general purpose/tx area and an rx area (figure 3-4). figure 3-4: sram buffer organization ethernet communications on 10base-t and 100base-tx networks occur at a fixed speed of 10 mbps or 100 mbps, respectively. intra-byte gaps are not allowed. this requires the host controller to build outbound transmit frames in their entirety in the sram buffer before the hardware is allowed to begin trans- mission. similarly, when receiving packets, the buffer provides space for the hardware to write the incoming packet without forcing the host microcontroller to immediately read and process the packet. after the part exits reset, the entire buffer is accessible by the host controller, regardless of other transmit, receive or dma operations that may simultaneously also be accessing the general purpose or receive buffer memory. exponent (e) (up to 1024 bits) dma pointers data/result (x/y) (up to 1024 bits) modulus (m) (512, 768 or 1024 bits) unimplemented 7800h 787fh 7880h 78ffh 7900h 797fh data in (512 bits) initialization vector/state in (160 bits) length state in (55 bits) 7a00h 7a3fh 7a40h 7a53h 7a54h 7a5bh digest/state out (128 or 160 bits) 7a70h 7a83h length state out (55 bits) 7a84h 7a8bh unimplemented encryption key (128, 192 or 256 bits) 7c00h 7c1fh text a in/out (128 bits) 7c20h 7c2fh text b in/out (128 bits) 7c30h 7c3fh xor out (128 bits) 7c40h 7c4fh modular exponentiation md5/sha-1 hash aes general purpose buffer 0000h 5fffh circular rx fifo buffer erxst erxst C 1 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 33 enc424j600/624j600 3.5.1 general purpose buffer the general purpose buffer memory starts at address 0000h and includes all memory up to, but not including, the memory address pointed to by the erxst register (i.e., erxst C 1). this buffer can be used to store transmit packets, received data that the host controller wishes to save for an extended period, or any type of volatile or state information that the host controller does not have room internally to save. upper layer communications proto- cols and applications, such as a tcp/ip stack with ssl or tls security, are generally infeasible or will perform poorly over high latency internet links without using large buffers. for reliable, connection oriented protocols like tcp, the maximum theoretical throughput is directly proportional to the round trip acknowledgement latency of the link and the size of the corresponding transmit or receive buffer. the general purpose buffer memory on the encx24j600 is well suited for use by tcp for implementing high-performance communications across the internet, where round trip acknowledgement latency is in the order of many milliseconds. 3.5.2 receive buffer the receive buffer constitutes a circular fifo buffer managed by hardware. the buffer extends inclusively from the byte pointed to by the erxst pointer, to the very end of the sram at address 5fffh. the size of the buffer, in bytes, is therefore defined as: rx buffer size = 5fffh C erxst + 1 as bytes of data are received from the ethernet interface, they are written into the receive buffer sequentially. however, after the memory at address 5fffh is written to, the hardware will automatically wrap around and write the next byte of received data to the erxst address. as a result, the receive hardware will never write outside the boundaries of the rx fifo buffer. for proper 16-bit word alignment, the erxst pointer is required to point to an even memory address. the least significant bit of this register is read-only and fixed as 0 to force even alignment. all other implemented bits in this register are read/write and can be programmed by software to point to any even address, from 0000h to 5ffeh. the default value of erxst on device reset is 5340h. this allocates 21,312 bytes to the general purpose buffer and 3,264 bytes to the rx buffer. this rx buffer size is adequate to store at least two maximum length ethernet frames, or any combination of numerous smaller packets. the host controller may only program the erxst pointer when the receive logic is disabled. the pointer must not be modified while the receive logic is enabled by having rxen (econ1<0>) set. the receive memory is always accessible to the rx hardware, regardless of transmit, dma operations or host controller read/write operations, which may be accessing the sram simultaneously. the rx hardware will never drop a packet due to insufficient memory access bandwidth. 3.5.3 transmit buffer the enc624j600 family does not implement a dedi- cated transmit buffer. the transmit hardware has the flexibility of transmitting data starting at any memory address, including odd memory addresses which are off of a 16-bit word boundary. the host controller can transmit data from either the general purpose area or rx fifo area of the entire 24 kbytes of sram. because of the transmit flexibility, the host controller may store many prebuilt packets in the general purpose buffer for quick transmission. alternatively, because the hardware can transmit data from the receive buffer, it is possible to quickly modify certain packet header fields and retransmit received packets without reading the entire packet contents into the host microcontroller. this feature may improve performance on certain proxy, gateway or echoing (ping) applications. the transmit hardware performs reads from the sram only; it never writes anything into the sram. the entire sram is always accessible to the tx hardware, regardless of the receive activity, dma operations or host controller read/write operations, which may be simultaneously attempting to access the sram. 3.5.4 direct sram buffer access when one of the psp interfaces is used, the sram buffer is directly accessible through the interface. assuming that all necessary address lines are con- nected, all addresses in the memory maps shown in figure 3-2 (except for the cryptographic data memory) may be directly read and written to. when accessed through this manner, the host controller must handle all address increment and wrap-around calculations that may be necessary. this also includes translation from byte to word addressing when a 16-bit psp interface is used. direct access is unavailable when the spi interface is used. downloaded from: http:///
enc424j600/624j600 ds39935c-page 34 ? 2010 microchip technology inc. 3.5.5 indirect sram buffer access indirect access to the sram buffer is available to all i/o interfaces. for the spi interface, it is the only method available. for psp interfaces, it may be used in addition to the direct access method. three separate pointer pairs are available for the host microcontroller to use when accessing the sram: general purpose buffer read/write pointer (egprdpt/egpwrpt) receive buffer read/write pointer (erxrdpt/erxwrpt) user-defined area read/write pointer (eudardpt/eudawrpt) each of these pointer pairs provides an 8-bit virtual window register (egpdata, erxdata and eudata) through which the sram data is read or written. the pointers and their associated data windows are shown in figure 3-5. egpdata, erxdata and eudadata are all 8 bits wide. when writing to them using a 16-bit psp interface, the low-order byte select or write enable must be used; strobing the high byte byte select or write enable has no effect. when reading from a 16-bit psp interface, one byte of useful data will be returned on the lower 8 bits of the data bus; the upper 8 bits are to be ignored. when a data window register is read, the memory contents at the address indicated by the corresponding read pointer are obtained and presented to the host microcontroller. similarly, when a data window register is written, the memory contents at the address indicated by the corresponding write pointer are updated by the data from the host microcontroller. following a read/write operation, the appropriate pointer is automatically incremented in hardware. figure 3-5: pointers for indirect buffer access general purpose buffer 0000h 5fffh circular rx fifo buffer erxst erxst C 1 egprdpt egpwrpt erxrdpt erxwrpt eudardpt eudawrpt eudast eudand egpdata erxdata eudadata egpdata erxdata eudadata eudadata egpdata erxdata unimplemented read write read write read write data windows buffer pointers downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 35 enc424j600/624j600 for example, to read data from address 5402h of the buffer: 1. write 5402h to egprdpt. 2. read from egpdata. following the read, the egprdpt value normally increments by 1 (to 5403h in this example). if the host subsequently wants to read from address 5403h, it can simply perform a second read from the egpdata window register. the write pointer, egpwrpt, is not affected by the read operation. similarly, to write a3h to address 0007h of the buffer: 1. write 0007h to egpwrpt. 2. write a3h to egpdata. following the write, the egpwrpt value normally increments by 1 (to 0008h in this example). the read pointer, egprdpt, is not affected by the write operation. each of the three pointer sets (general purpose, receive and user-defined area) can be used to access any address within the sram buffer. they differ from each other based on their address wrapping behavior. applications may choose to use all three pointer interfaces to access the ram. this may offer maximum application performance as it will require minimal con- text switching overhead when, for example, switching from reading a received packet to reading from general purpose ram. however, for simplicity, some applications may prefer to use only one or two of the three e*data interfaces. 3.5.5.1 circular wrapping with egpdata normally, operations involving egpdata cause the egprdpt or egpwrpt pointer to automatically increment by one byte address. however, if the end of the general purpose buffer area (erxst C 1) is reached, or the end of the implemented sram (5fffh) is reached, the pointer will increment to address 0000h instead, causing subsequent accesses to wrap around to the beginning of the sram buffer (figure 3-6). the increment behavior logic is explained in equation 3-1. figure 3-6: circular buffer wrapping using the egpdata window equation 3-1: pointer increment logic for egprdpt and egpwrpt general purpose buffer 0000h 5fffh circular rx fifo buffer erxst erxst C 1 unimplemented if egprdpt/egpwrpt = erxst C 1, then egprdpt/egpwrpt = 0000h else if egprdpt/egpwrpt = 5fffh, then egprdpt/egpwrpt = 0000h else egprdpt/egpwrpt = egprdpt/egpwrpt + 1 downloaded from: http:///
enc424j600/624j600 ds39935c-page 36 ? 2010 microchip technology inc. 3.5.5.2 circular wrapping with erxdata as with the general purpose pointers, operations with erxdata normally cause the erxrdpt or erxwrpt pointer to automatically increment by one byte address. however, if the end of the receive buffer area (5fffh) is reached, the pointer will increment to the start of the receive fifo buffer area instead, as defined by erxst (figure 3-7). the receive wrapping rules for the erxdata interface are identical to the buffer wrapping rules used by the receive hardware. therefore, this register interface is ideally suited to reading packet data from the receive buffer. the host controller can set the erxrdpt value at the start of a packet in the receive buffer and sequen- tially read out the entire packet contents without having to write to the erxrdpt read pointer again. figure 3-7: circular buffer wrapping using the erxdata window equation 3-2: pointer increment logic for erxrdpt and erxwrpt 3.5.5.3 circular wrapping with eudadata the user-defined buffer area is primarily useful for setting up a circular fifo within the general purpose area for use by tcp/ip stacks or other applications. the wrap-around behavior of the user-defined buffer area is somewhat more complicated than with the general purpose or receive buffer cases. this is because the user-definable boundaries set by eudast and eudand take priority over normal wrapping behavior. like other pointers, eudast and eudand are fully user-configurable from the host microcontroller. unlike erxst, which must not be modified while the receive hardware is enabled, eudast and eudand can be modified at any time. as in the previous instances, operations with eudadata normally cause the eudardpt or eudawrpt pointer to automatically increment by one byte address. if the value in eudand is reached, the pointer will increment to the address specified by eudast instead. however, if the end of memory (5fffh) is reached, and eudand is located at some other address, the pointer will increment to the begin- ning of memory (0000h). if eudand is set to 5fffh, the pointer address increments to the value of eudast, instead of 0000h. the increment behavior logic is explained in equation 3-3. equation 3-3: pointer increment logic for eudardpt and eudawrpt general purpose buffer 0000h 5fffh circular rx fifo buffer erxst erxst C 1 unimplemented if erxrdpt/erxwrpt = 5fffh, then erxrdpt/erxwrpt = erxst else erxrdpt/erxwrpt = erxrdpt/erxwrpt + 1 if eudardpt/eudawrpt = eudand, then eudardpt/eudawrpt = eudast else if eudardpt/eudawrpt = 5fffh, then eudardpt/eudawrpt = 0000h else eudardpt/eudawrpt = e udardpt/eudawrpt + 1 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 37 enc424j600/624j600 the user-defined area start address, eudast, is a read/write register. for wrapping to work correctly, the hardware enforces 16-bit even word alignment of this register by internally having the least significant bit tied off to 0 . similarly, the user-defined area end address, eudand, is a read/write register that is forced to an odd memory address. the least signifi- cant bit of eudand is internally tied to 1 . applications wishing to set up general purpose circular fifos in memory using these hardware features must observe these same alignment requirements. if the user-defined area end address, eudand, is at a higher memory address relative to the start address, eudast, the buffer wraps to either eudast or the beginning of memory, depending on where the eudardpt or eudawrpt pointers are located. this is shown in case 1 of figure 3-8. in some cases (for example, when accessing fragmented data), it may be useful to place the eudast pointer at a higher memory address relative to the end address. when organized in such a manner, an exclusion zone in the middle of the memory range is created; sequential read/write operations with the user-defined area pointers will jump over the range of addresses between eudand and eudast. this is shown in case 2. if the user-defined buffer is not needed, it can effectively be disabled by setting eudast and eudand to addresses outside of the implemented memory area. for example, if eudast is set to 6000h and eudand is set to 6001h, eudardpt and eudawrpt will never reach these addresses. instead, they wrap from the end of implemented ram to its beginning, as shown in case 3. when the user-defined buffer is disabled, the host con- troller can use the eudadata interface as a second general purpose window into ram. unlike the original general purpose pointers, however, eudardpt and eudawrpt do not wrap at the erxst boundary, thereby allowing access to the full sram buffer area. this may be beneficial for debugging and testing purposes where it may be desirable to read or write the entire sram buffer in a single operation. figure 3-8: circular buffer wrapping using the eudata window general purpose buffer 0000h 5fffh circular rx fifo buffer unimplemented eudast eudand general purpose buffer 0000h 5fffh circular rx fifo buffer unimplemented eudast eudand general purpose buffer 0000h 5fffh circular rx fifo buffer unimplemented eudast eudand case 1: eudand > eudast case 2: eudast > eudand case 3: eudast and eudand > 5fffh user-defined buffer disabled user-defined buffer with exclusion zone normal user-defined buffer excluded user-defined buffer downloaded from: http:///
enc424j600/624j600 ds39935c-page 38 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 39 enc424j600/624j600 4.0 serial peripheral interface (spi) enc424j600/624j600 devices implement an optional spi i/o port for applications where a parallel micro- controller interface is not available or is undesirable. an spi port is commonly available on many micro- controllers, and can be simulated in software on regular i/o pins where it is not implemented. this makes the spi port ideal for using enc424j600/624j600 devices with the widest possible range of host controllers. 4.1 physical implementation the spi port on enc424j600/624j600 devices operates as a slave port only. the host controller must be configured as an spi master that generates the serial clock (sck) signal. this implementation supports spi mode 0,0, which requires: sck is idle at a logic low state data is clocked in on rising clock edges and changes on falling clock edges other spi modes that use inverted clock polarity and/or phase are not supported. commands and data are sent to the device on the si pin. data is driven out on the so line on the falling edge of sck. the cs pin must be held low while any operation is performed, and returned to logic high when finished. when cs is in the inactive (logic high) state, the so pin is set to a high-impedance state and becomes 5v toler- ant. this allows the encx24j600 to be connected to a single spi bus shared by multiple spi slave devices that also go to a high-impedance state when inactive. for details on the physical connections to the interface, see section 2.7 host interface pins . 4.2 spi instruction set the spi interface supports a unique instruction set, consisting of 47 distinct opcodes. these include a large number of optimized opcodes that perform a wide range of frequently performed operations with a mini- mum of spi protocol overhead. complete ethernet functionality can be achieved with as few as six n-byte opcodes. the use of the other 41 is optional; however, doing so will generally improve overall system performance. the spi opcodes are divided into four families: single byte: direct opcode instructions; designed for task-oriented sfr operations with no data returned two-byte: direct opcode instruction; designed for sfr operation with byte data returned three-byte: opcode with word length argument; includes read and write operations, designed for pointer manipulation with word length data returned n-byte: opcode with one or more bytes of argument; includes read and write operations designed for general memory space access with one or more bytes of data returned a complete summary of all opcodes is provided in table 4-1. a detailed explanation of each opcode family follows. downloaded from: http:///
enc424j600/624j600 ds39935c-page 40 ? 2010 microchip technology inc. table 4-1: spi instruction set instruction mnemonic instruction 1st byte 2nd byte 3rd byte nth byte bank 0 select b0sel 1100 0000 bank 1 select b1sel 1100 0010 bank 2 select b2sel 1100 0100 bank 3 select b3sel 1100 0110 system reset setethrst 1100 1010 flow control disable fcdisable 1110 0000 flow control single fcsingle 1110 0010 flow control multiple fcmultiple 1110 0100 flow control clear fcclear 1110 0110 decrement packet counter setpktdec 1100 1100 dma stop dmastop 1101 0010 dma start checksum dmacksum 1101 1000 dma start checksum with seed dmacksums 1101 1010 dma start copy dmacopy 1101 1100 dma start copy and checksum with seed dmacopys 1101 1110 request packet transmission settxrts 1101 0100 enable rx enablerx 1110 1000 disable rx disablerx 1110 1010 enable interrupts seteie 1110 1100 disable interrupts clreie 1110 1110 read bank select rbsel 1100 1000 xxxx xxxx write egprdpt wgprdpt 0110 0000 dddd dddd dddd dddd read egprdpt rgprdpt 0110 0010 xxxx xxxx xxxx xxxx write erxrdpt wrxrdpt 0110 0100 dddd dddd dddd dddd read erxrdpt rrxrdpt 0110 0110 xxxx xxxx xxxx xxxx write eudardpt wudardpt 0110 1000 dddd dddd dddd dddd read eudardpt rudardpt 0110 1010 xxxx xxxx xxxx xxxx write egpwrpt wgpwrpt 0110 1100 dddd dddd dddd dddd read egpwrpt rgpwrpt 0110 1110 xxxx xxxx xxxx xxxx write erxwrpt wrxwrpt 0111 0000 dddd dddd dddd dddd read erxwrpt rrxwrpt 0111 0010 xxxx xxxx xxxx xxxx write eudawrpt wudawrpt 0111 0100 dddd dddd dddd dddd read eudawrpt rudawrpt 0111 0110 xxxx xxxx xxxx xxxx read control register rcr 000a aaaa xxxx xxxx xxxx xxxx xxxx xxxx write control register wcr 010a aaaa dddd dddd dddd dddd dddd dddd read control register unbanked rcru 0010 0000 aaaa aaaa xxxx xxxx xxxx xxxx write control register unbanked wcru 0010 0010 aaaa aaaa dddd dddd dddd dddd bit field set bfs 100a aaaa dddd dddd dddd dddd dddd dddd bit field clear bfc 101a aaaa dddd dddd dddd dddd dddd dddd bit field set unbanked bfsu 0010 0100 aaaa aaaa dddd dddd dddd dddd bit field clear unbanked bfcu 0010 0110 aaaa aaaa dddd dddd dddd dddd read egpdata rgpdata 0010 1000 xxxx xxxx xxxx xxxx xxxx xxxx write egpdata wgpdata 0010 1010 dddd dddd dddd dddd dddd dddd read erxdata rrxdata 0010 1100 xxxx xxxx xxxx xxxx xxxx xxxx write erxdata wrxdata 0010 1110 dddd dddd dddd dddd dddd dddd read eudadata rudadata 0011 0000 xxxx xxxx xxxx xxxx xxxx xxxx write eudadata wudadata 0011 0010 dddd dddd dddd dddd dddd dddd legend: x / x = read data, d/d = write data, a = banked sfr address, a = unbanked sfr address. x and d are optional. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 41 enc424j600/624j600 4.3 single byte instructions all single byte instructions are designed to perform a simple command that affects the encx24j600 devices state. in most cases, they set or clear a small number of control bits which would otherwise require one or more n-byte opcodes to perform. none of these instructions return any data to the host microcontroller. figure 4-1 shows the timing relationships for performing a single byte operation. the opcode ( 11xxxxx0 ) is presented on the devices si pin starting with the most significant bit of the opcode; the least significant bit is always 0 . the so pin is actively driven with indeterminate 1 s or 0 s while the cs pin is driven low. it continues to be driven until the cs pin is returned high. because all single byte instructions are fixed length with no optional parameters, it is possible to execute any instruction immediately following the execution of any single byte instruction without deasserting the chip select line in between. if the cs control signal is deactivated before the 8th bit of the opcode is sent to the encx24j600, indeterminate results will occur. in some cases, the instruction is executed or partially executed. to avoid this, it is recom- mended that a single byte instruction should not be interrupted. if it is unavoidable that an instruction gets partially executed, have the application later reissue the same instruction and let it complete to place the device into a known state. there are a total of 20 single byte opcodes, which are listed in table 4-2. all single byte opcodes will operate regardless of which sfr bank is selected at the time. those opcodes that affect multiple bits, or affect sfr addressing, are detailed below. 4.3.1 bxsel opcodes the bank select opcodes, b0sel , b1sel , b2sel and b3sel , switch the sfr bank to bank 0, bank 1, bank 2 or bank 3, respectively. the updated bank select state is saved internally inside the encx24j600 in volatile memory. firmware can retrieve the currently selected sfr bank state by using the read bank select ( rbsel ) opcode. the bank select opcodes are needed to access most sfr addresses when using the rcr , wcr , bfs and bfc instructions. these are discussed in more detail in section 4.6 n-byte instructions . upon device power-up or system reset, bank 0 is automatically selected. after reset, hardware does not modify the bank state again. any value programmed by a bxsel opcode is retained until the next bxsel opcode is executed or a system reset is issued. 4.3.2 fc (flow control) opcodes the flow control opcodes, fcdisable , fcsingle , fcmultiple and fcclear , all modify the devices flow control mode by changing the values of the fcop<1:0> bits (econ1<7:6>). these opcodes execute regardless of the currently selected sfr bank. for more information on flow control operation, see section 11.0 flow control . 4.3.3 dma opcodes the dma opcodes, dmastop , dmacksum , dmacksums , dmacopy and dmacopys , modify the operation of the devices dma controller, all by simultaneously changing the values of the dmast, dmacpy, dmacssd and dmanocs control bits (econ1<5:2>). for more infor- mation on dma operation, see section 14.0 direct memory access (dma) controller . figure 4-1: single byte instruction timing cs sck si so x x x x x x x x hi-z hi-z x 1 2 3 4 5 6 7 8 opcode 1 1 c5 c4 c3 c2 c1 0 downloaded from: http:///
enc424j600/624j600 ds39935c-page 42 ? 2010 microchip technology inc. table 4-2: single byte instructions 4.4 two-byte instructions there is only one instruction in the encx24j600 com- mand set which uses two spi bytes. the read bank select opcode, rbsel , reads the internal sfr bank select state and returns the value to the host controller. figure 4-2 shows the timing relationships for perform- ing the two-byte operation. the first byte of the opcode ( 11001000 ) must be presented on the si pin, msb first, followed by dont care values for the second byte (9 th through 16 th sck rising edges). the bank select value (00h through 03h) is returned on the so pin, msb first, while the second byte is being presented on the si pin. because this instruction is a fixed length with no optional parameters, it is possible to execute any instruction following the execution of rbsel without deasserting the chip select line in between. since this opcode does not modify the encx24j600 internal state, it can be aborted at any time by returning the cs pin to the inactive state. figure 4-2: two-byte instruction timing ( rbsel opcode) mnemonic opcode instruction b0sel 1100 0000 selects sfr bank 0 b1sel 1100 0010 selects sfr bank 1 b2sel 1100 0100 selects sfr bank 2 b3sel 1100 0110 selects sfr bank 3 setethrst 1100 1010 issues system reset by setting ethrst (econ2<4>) fcdisable 1110 0000 disables flow control (sets econ1<7:6> = 00 ) fcsingle 1110 0010 transmits a single pause frame (sets econ1<7:6> = 01 ) fcmultiple 1110 0100 enables flow control with periodic pause frames (sets econ1<7:6> = 10 ) fcclear 1110 0110 terminates flow control with a final pause frame (sets econ1<7:6> = 11 ) setpktdec 1100 1100 decrements pktcnt by setting pktdec (econ1<8>) dmastop 1101 0010 stops current dma operation by clearing dmast (econ1<5>) dmacksum 1101 1000 starts dma and checksum operation (sets econ1<5:2> = 1000 ) dmacksums 1101 1010 starts dma checksum operation with seed (sets econ1<5:2> = 1010 ) dmacopy 1101 1100 starts dma copy and checksum operation (sets econ1<5:2> = 1100 ) dmacopys 1101 1110 starts dma copy and checksum operation with seed (sets econ1<5:2> = 1110 ) settxrts 1101 0100 sets txrts (econ1<1>), sends an ethernet packet enablerx 1110 1000 enables packet reception by setting rxen (econ1<0>) disablerx 1110 1010 disables packet reception by clearing rxen (econ1<0>) seteie 1110 1100 enable ethernet interrupts by setting int (estat<15>) clreie 1110 1110 disable ethernet interrupts by clearing int (estat<15>) cs sck si so x x x x x x x x hi-z hi-z x 0 0 1 0 0 d d 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 rbsel opcode sfr bank select 1 0 1 0 0 0 00 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 43 enc424j600/624j600 4.5 three-byte instructions all three-byte instructions are designed to quickly read or update the read and write pointers used to access the sram buffer area. unlike the single byte instruc- tions and rbsel , each instruction in this group has distinct read and write implementations. for read commands (shown in figure 4-3), the opcode byte ( 011xxx10 ) must be presented on the si pin, msb first, followed by dont care values for the second and third bytes (9 th through 24 th sck rising edges). response data is returned on the so line during the second and third bytes. data on the so line is also presented in msb first bit ordering. however, read commands are intended to read a 16-bit pointer in little-endian byte ordering. therefore, the first byte on the so line (returned during sck clocks, 9 through 16) is the lower byte of the 16-bit pointer and is followed by the upper byte (returned during sck clocks 17 through 24). read operations do not affect the encx24j600 devices internal state, and therefore, can be aborted at any time by deasserting chip select. for write commands (shown in figure 4-4), the opcode byte ( 011xxx00 ) must be presented on the si line, msb first, followed immediately by the pointer data to be written. like the data returned during a read operation, the write data must be presented msb first, least significant byte first. if the application only needs to write to the lower byte of a 16-bit pointer, it can optionally skip the upper byte by raising chip select after the 16 th clock pulse and allowing adequate chip select hold time to elapse. the hardware would then update the lower byte of the pointer while maintaining the original value in the upper byte. during write operations, the device actively drives the so line while the chip select line is active. the value during this interval is to be ignored. all three-byte instructions, including read operations, are considered to be finished at the end of the 24th sck clock (if reached). the host controller may issue another spi instruction or multiple fixed length instructions without deasserting chip select. there are 12 three-byte instructions, which are divided equally between read and write instructions. they are listed in table 4-3. figure 4-3: three-byte read instruction timing figure 4-4: three-byte write instruction timing cs sck si so x x x x x x x x hi-z hi-z x d7 d6 d5 1 1 0 c4 c3 c2 1 d7 d6 d5 d4 d3 d2 d1 d0 d4 d3 d2 d1 d0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode read low byte read high byte (optional) cs sck si so x x x x x x x x hi-z d5 d4 d3 d2 d1 hi-z x d6 d7 d0 x x x d0 1 1 0 c4 c3 c2 0 d7 d6 d5 d4 d3 d2 d1 x x x x x x x x x x x x x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode write low byte write high byte (optional) downloaded from: http:///
enc424j600/624j600 ds39935c-page 44 ? 2010 microchip technology inc. table 4-3: three-byte instructions mnemonic opcode argument instruction 1st byte 2nd byte 3rd byte wgprdpt 0110 0000 dddd dddd dddd dddd write general purpose buffer read pointer (egprdpt). rgprdpt 0110 0010 xxxx xxxx xxxx xxxx read general purpose buffer read pointer (egprdpt). wrxrdpt 0110 0100 dddd dddd dddd dddd write receive buffer read pointer (erxrdpt). rrxrdpt 0110 0110 xxxx xxxx xxxx xxxx read receive buffer read pointer (erxrdpt). wudardpt 0110 1000 dddd dddd dddd dddd write user-defined area read pointer (eudardpt). rudardpt 0110 1010 xxxx xxxx xxxx xxxx read user-defined area read pointer (eudardpt). wgpwrpt 0110 1100 dddd dddd dddd dddd write general purpose buffer write pointer (egpwrpt). rgpwrpt 0110 1110 xxxx xxxx xxxx xxxx read general purpose buffer write pointer (egpwrpt). wrxwrpt 0111 0000 dddd dddd dddd dddd write receive buffer write pointer (erxwrpt). rrxwrpt 0111 0010 xxxx xxxx xxxx xxxx read receive buffer write pointer (erxwrpt). wudawrpt 0111 0100 dddd dddd dddd dddd write user-defined area write pointer (eudawrpt). rudawrpt 0111 0110 xxxx xxxx xxxx xxxx read user-defined area write pointer (eudawrpt). legend: x/d = pointer data (lsb), x/d = pointer data (msb, optional). downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 45 enc424j600/624j600 4.6 n-byte instructions n-byte instructions make up the most versatile class of spi commands, as they can read or write to any addressable sfr or sram space. their name comes from their variable length nature; they require a mini- mum of two bytes, but can take an indefinite number of bytes of data argument, or return an unlimited number of output bytes. this makes them useful for reading or writing entire arrays of data to or from the sram buffer. since these instructions are of an intrinsically variable length, no other opcode may follow any n-byte instruction until the cs line is driven high. driving cs high terminates the instruction and then places the so pin in a high-impedance state. the format of the n-byte instructions differs depending on if a read versus a write command is executed, and if a banked sfr, unbanked sfr or sram location is accessed. the differences are discussed in the following sections. 4.6.1 banked sfr operation the n-byte banked sfr instructions are wcr , rcr , bfs and bfc . these instructions depend on the use of the appropriate bxsel instructions to select the proper sfr bank prior to their execution. because of this, they cannot be used for the unbanked sfr space (80h through 9fh). figure 4-5 shows the timing relationships for these operations. like all other opcodes, data must be presented on the si pin, msb first. for all banked instructions, the first byte of data must be the opcode, comprised of a 3-bit prefix designating the instruction and a 5-bit banked sfr address. if the instruction is a write or bit field set/clear opcode, the next bytes are the data or bit mask to be written. for read instructions, the next bytes on the si pin are dont care. for write and bit field set/clear instructions, the so pin is actively driven with indeterminate 1 s or 0 s while the cs pin is driven low. for read instructions, indeter- minate data is clocked out on so during sck clocks, 1 through 8. starting with the 9th clock, valid data is clocked out byte-wise on so, msb first. as long as the cs pin is held low, clocks on sck are provided and data is presented on si, the instruction continues to execute indefinitely, automatically incre- menting to the next register address in the sfr bank and writing data from si to, or outputting data on so from, subsequent registers. when the end of a bank is reached, the address automatically wraps back to the beginning (00h) of the bank and continues; the selected bank does not change. figure 4-5: n-byte spi instruction timing (banked sfr operations) cs sck si so x x x x x x x x hi-z d5 d4 d3 d2 d1 d6 d7 d0 x x x d0 a4 a3 a2 d7 d6 d5 d4 d3 d2 d1 x x x x x x x x x x x x x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode w/sfr address write 1st byte write 2nd byte (optional) 25 26 27 d7 d6 d5 x x x additional c7 c6 c5 a1 a0 cs sck si so x x x x x x x x hi-z d7 d6 d5 a4 a3 a2 d7 d6 d5 d4 d3 d2 d1 d0 d4 d3 d2 d1 d0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 read 1st byte read 2nd byte (optional) 25 26 27 d7 d6 d5 additional c7 c6 c5 a1 a0 opcode w/sfr address write operation read operation downloaded from: http:///
enc424j600/624j600 ds39935c-page 46 ? 2010 microchip technology inc. there are four banked sfr opcodes, summarized in table 4-4. additional details for these opcodes are provided below. 4.6.1.1 wcr opcode the write control register ( wcr ) opcode byte consists of the prefix, 010 , concatenated with the 5-bit banked sfr address of the first register to write to. for example, if bank 3 were currently selected and the host microcontroller wanted to write to the econ2l register at banked address 0eh, the 8-bit opcode would be 01001110 or 4eh. generally, wcr can be executed on most register addresses, in any sequence and for any length. an important exception is when wcr is used on any mac or mii register. these registers must be written as a whole 16-bit register, low byte first (e.g., macon1 must be written by first writing to macon1l, then macon1h). writing only to the upper byte of a mac or mii register results in a successful write to the upper register, while the lower register is written with indeter- minate data. if a wcr instruction is aborted by raising cs while writing to the upper byte of a mac or mii register, neither upper nor lower byte will be updated. 4.6.1.2 rcr opcode the read control register ( rcr ) opcode byte consists of the prefix, 000 , concatenated with the 5-bit banked sfr address of the first register to read from. using the previous example, the 8-bit opcode to read econ2l would be 00001110 or 0eh. read operations can be performed against any register address, in any sequence and for any length. however, due to volatile register shadowing, it is recommended that the erxheadh:erxheadl register pair be read in sequence (low byte first) to obtain the correct value. see section 9.2 receiving packets for additional information. 4.6.1.3 bfs and bfc opcodes the bit field set ( bfs ) and bit field clear ( bfc ) opcodes consist of the prefix, 100 (for bfs ) or 101 (for bfc ), concatenated with the 5-bit banked sfr address of the first register to write to. in terms of timing and automatic address increment, they behave almost identically to the wcr opcode. however, instead of absolute data to be written to a register, the host microcontroller provides a bit mask showing which bits of the target register need to be set or cleared. for bfs , the encx24j600 performs a logical or operation with the supplied bit field causing 1 bits in the bit field to become set bits in the register; 0 bits in the bit field have no effect on the corresponding register bits. for bfc , the encx24j600 performs a logical and with the complement of the supplied mask. this causes 1 bits in the mask to become clear bits in the register; 0 bits in the mask do not affect the corresponding register bits. the host controller must use bit field operations when attempting to change bits in a volatile control or interrupt flag register. normally, changing such a bit might be accomplished by the application as a read-modify-write operation: reading the control regis- ters contents, modifying the register copy in memory on the controller side and writing the modified register data back to the encx24j600. in a dynamic environment, however, one or more control bits may change state between the read and write, resulting in an incorrect device state after the write. as an example, assume that the dma module is in use (econ1l<5> = 1 ) at the same time that the application wants to transmit a packet (i.e., setting econ1l<1>). by the time a read-modify-write on econ1l is complete, the dma operation may have completed and cleared econ1l<5>. in this case, the write back erroneously starts a new dma operation. using bfs and bfc allows for bit level changes to one or more control bits without the delay of a read and write back. in the previous example, using bfs with a bit mask of 00000010 on econ1l, sets econ1l<1> and starts a packet transmission without affecting the status of econ1l<5>. table 4-4: n-byte banked sfr instructions note: unlike the wcr opcode, bfs and bfc cannot be used to modify mac or mii registers. never use these opcodes on mac and mii registers. instruction mnemonic opcode argument 1st byte 2nd byte 3rd byte nth byte read control register(s) rcr 000a aaaa xxxx xxxx xxxx xxxx xxxx xxxx write control register(s) wcr 010a aaaa dddd dddd dddd dddd dddd dddd bit field(s) set bfs 100a aaaa dddd dddd dddd dddd dddd dddd bit field(s) clear bfc 101a aaaa dddd dddd dddd dddd dddd dddd legend: x / x = read data (lsb/msb), d / d = write data (lsb/msb), a = banked sfr address. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 47 enc424j600/624j600 4.6.2 unbanked sfr operations the n-byte unbanked sfr instructions are wcru , rcru , bfsu and bfcu . these instructions use an opcode with a one-byte address argument and do not depend on the use of bxsel instructions for sfr bank selection. figure 4-6 shows the timing relationships for these operations. like all other opcodes, data is presented on the si pin, msb first. for this class of instructions, the first byte of data is a specific opcode; the second byte is the 8-bit absolute address of the target sfr. if the instruction is a write or bit set/clear opcode, the next bytes are the data or bit mask to be written. for read instructions, the next bytes are dont cares. for write and bit set/clear instructions, the so pin is actively driven with indeterminate 1 s or 0 s while the cs pin is driven low. for read instructions, random data is clocked out on so during sck clocks, 1 through 16. starting with the 17th clock, data is clocked out byte-wise on so, msb first. as with three-byte instructions, the lower byte of a data word is presented first, followed by the upper byte. as long as the cs pin is held low, the instruction continues to execute, automatically incrementing to the next register address in the sfr space and writing data from si to, or outputting data on so from, subsequent registers. when the end of a bank is reached, the address continues to the top of the next bank. addresses continue to increment through the banks into the unbanked sfr area (addresses 80h through 9fh), then wrap around to the start of bank 0 (00h). the sfr bank value used by the bxsel and rbsel opcodes is not affected by the execution of unbanked sfr instructions. there are four unbanked sfr opcodes, summarized in table 4-5. except for addressing, the unbanked sfr instructions are analogous to the banked sfr instruc- tions. however, there are certain differences in their behavior with certain pointer registers, as noted below. figure 4-6: n-byte spi opco de (unbanked sfr operations) cs sck si so x x x x x x x x hi-z a5 a4 a3 a2 a1 a0 x x x d0 0 0 c2 d7 d6 d5 d4 d3 d2 d1 x x x x x x x x x x x x x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode unbanked sfr address write 1st byte 25 26 27 d7 d6 d5 x x x additional 0 0 1 c1 0 cs sck si so x x x x x x x x hi-z 0 0 c2 d7 d6 d5 d4 d3 d2 d1 d0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode unbanked sfr address read 1st byte 25 26 27 d7 d6 d5 additional 0 0 1 c1 0 a5 a4 a3 a2 a1 a0 a6 a7 a6 a7 x x x x x x xx write operation read operation downloaded from: http:///
enc424j600/624j600 ds39935c-page 48 ? 2010 microchip technology inc. 4.6.2.1 wcru opcode the write control register unbanked ( wcru ) opcode starts with the opcode, 00100010 (22h), followed by the unbanked sfr register address during spi clocks, 9 through 16. for example, to write to econ2l at address 6eh, the instruction would be 22h 6eh, followed by the data to be written. when the host controller is finished writing data, it should raise the cs line, putting the device in an inactive state and preparing it for the next spi instruction. when finish- ing a wcru transaction, ensure that adequate cs hold time is provided for the last write to complete before raising cs . generally, wcru can be executed on most register addresses, in any sequence and for any length. an important exception is when wcru is used on any mac or mii register. these registers must be written as whole 16-bit registers, low byte first (e.g., macon1 must be written by first writing to macon1l, then macon1h). writing only to the upper byte of a mac or mii register results in a successful write to the upper register, while the lower register is written with indeter- minate data. if a wcru instruction is aborted by raising cs while writing to the upper byte of a mac or mii register, neither the upper nor lower byte will be updated. in addition, wcru cannot be used to write to the sram buffer virtual data windows (egpdata, erxdata and eudadata). writing to the buffer address indicated by the corresponding address pointers attempts has no effect on the memory location, and the pointers do not auto-increment. to write to the sram buffer using the virtual data windows, always use the sram buffer opcodes ( wgpdata , wrxdata and wudadata ) instead. 4.6.2.2 rcru opcode the read control register unbanked ( rcru ) opcode starts with the opcode, 00100000 (20h), followed by the unbanked sfr register address during spi clocks, 9 through 16. continuing the previous example, to read econ2l at address 6eh, the complete two-byte instruction would be 20h 6eh. read operations can be performed on most register addresses, in any sequence and for any length. however, due to volatile register shadowing, it is recommended that the erxheadh:erxheadl register pair be read in sequence (low byte first) to obtain the correct value. see section 9.2 receiving packets for additional information. similar to wcru , rcru cannot be used to read data from the sram buffer using the virtual data windows. reading the buffer address indicated by the corre- sponding address pointers returns indeterminant data and the pointers do not auto-increment. to read from the buffer using the virtual data windows, always use the sram buffer opcodes ( rgpdata , rrxdata and rudadata ) instead. 4.6.2.3 bfsu and bfcu opcodes the bit field set unbanked ( bfsu ) and bit filed clear unbanked ( bfcu ) opcodes start with the opcode, 00100100 (24h) for bfsu , or 00100110 (26h) for bfcu , followed by the unbanked sfr register address during spi clocks, 9 through 16. in terms of timing and automatic address increment, they behave almost identically to the wcru opcode. bfsu and bfcu function in the same manner as bfs and bfc , by setting or clearing individual bits in the tar- get register through the use of a bit mask. they are also used in the same situations as bfs and bfc ; namely, when it is necessary to manipulate a single control bit or interrupt flag in a dynamic situation, while avoiding the disruption of other bits. see section 4.6.1.3 bfs and bfc opcodes for a detailed explanation. table 4-5: n-byte unbanked sfr instructions note 1: unlike wcru , bfsu and bfcu cannot be used to modify mac or mii registers. never use these opcodes on mac and mii registers. 2: bfsu and bfcu opcodes have no effect on any sfr in the unbanked region (addresses 80h through 9fh). instruction mnemonic opcode argument 1st byte 2nd byte 3rd byte nth byte read control register(s), unbanked rcru 0010 0000 aaaa aaaa xxxx xxxx xxxx xxxx write control register(s), unbanked wcru 0010 0010 aaaa aaaa dddd dddd dddd dddd bit field(s) set, unbanked bfsu 0010 0100 aaaa aaaa dddd dddd dddd dddd bit field(s) clear, unbanked bfcu 0010 0110 aaaa aaaa dddd dddd dddd dddd legend: x / x = read data (lsb/msb), d / d = write data (lsb/msb), a = unbanked sfr address. x and d are optional. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 49 enc424j600/624j600 4.6.3 sram buffer operations the six n-byte sram instructions function in a similar manner to the banked sfr instructions, in that they use a single byte opcode to define the operation and target register. in terms of timing, they are virtually identical, as shown in figure 4-7. like all other opcodes, data is presented on the si pin, msb first. for all instructions, the first byte of data is the opcode. if the instruction is a write opcode, the next bytes are the data to be written. for read instructions, the next bytes are dont cares. for write instructions, the so pin is actively driven with indeterminate 1 s or 0 s while the cs pin is driven low. for read instructions, random data is clocked out on so during sck clocks, 1 through 8. starting with the 9th clock, data is clocked out byte-wise on so, msb first. as long as the cs pin is held low, the instruction continues to execute, automatically incrementing to the next sram address according to the pointer wrapping rules described in section 3.5.5 indirect sram buffer access . the associated read or write pointer sfrs are automatically updated for each 8 sck clocks. to terminate the read or write operation, the cs signal must be returned high. there are 6 instructions divided equally between read and write instructions. they are summarized in table 4-6. figure 4-7: n-byte spi opco de (sram buffer operations) cs sck si so x x x x x x x x hi-z d5 d4 d3 d2 d1 d6 d7 d0 x x x d0 c4 c3 c2 d7 d6 d5 d4 d3 d2 d1 x x x x x x x x x x x x x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode write 1st byte write 2nd byte (optional) 25 26 27 d7 d6 d5 x x x additional 0 0 1 10 cs sck si so x x x x x x x x hi-z d7 d6 d5 c4 c3 c2 d7 d6 d5 d4 d3 d2 d1 d0 d4 d3 d2 d1 d0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 opcode read 1st byte read 2nd byte (optional) 25 26 27 d7 d6 d5 additional 0 0 1 0 0 write operation read operation downloaded from: http:///
enc424j600/624j600 ds39935c-page 50 ? 2010 microchip technology inc. table 4-6: n-byte sram instructions instruction mnemonic opcode argument 1st byte 2nd byte 3rd byte nth byte read data from egpdata rgpdata 0010 1000 xxxx xxxx xxxx xxxx xxxx xxxx write data from egpdata wgpdata 0010 1010 dddd dddd dddd dddd dddd dddd read data from erxdata rrxdata 0010 1100 xxxx xxxx xxxx xxxx xxxx xxxx write data from erxdata wrxdata 0010 1110 dddd dddd dddd dddd dddd dddd read data from eudadata rudadata 0011 0000 xxxx xxxx xxxx xxxx xxxx xxxx write data from eudadata wudadata 0011 0010 dddd dddd dddd dddd dddd dddd legend: x / x = read data (lsb/msb), d / d = write data (lsb/msb). x and d are optional. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 51 enc424j600/624j600 5.0 parallel slave port interface (psp) enc424j600/624j600 devices are designed to interface directly with the parallel port available on many microcontrollers, including the parallel master port (pmp) available on many microchip pic ? micro- controllers. the parallel slave port interface is highly flexible, and can communicate using either intel ? or motorola ? formats for read and write control strobes. in the event that a parallel port is not available on the host microcontroller, a software-managed parallel interface derived from general purpose i/o pins can be used. when the psp interface is enabled, the encx24j600 functions as a slave device on the parallel bus. the host controller must be configured to generate the destination or target address on the slave device, as well as the necessary port control signals. 5.1 physical implementation the psp interface is mutually exclusive with the serial interface. to enable the psp and disable the spi, tie the int /spisel pin to vss through an external resistor. the psp interface can use from 12 to 34 pins, depend- ing on the device pin count and the psp operating mode. there are up to eight modes, covering the permutations of data widths, data/address multiplexing and bus strobe formats. the modes are selected by tieing each of the pspcfg<4:0> pins to either v dd or v ss . the available combinations along with relative performance metrics are summarized in table 5-1. additional information on physical connections are provided in section 2.7.2 psp . in psp mode, the cs /cs pin becomes the active-high chip select (cs) pin. a weak internal pull-down is auto- matically connected to the pin when the psp interface is selected, preventing the pin from floating to an indeterminate state when an external chip select signal is absent. when cs is in the inactive (logic-low) state, the ad15 (64-pin devices only) and ad<14:0> pins are placed in a high-impedance state and are 5v tolerant. this allows the encx24j600 to share a single parallel bus with other slave devices that function the same way while deselected. all other psp pins, including the a<14:0> pins (64-pin devices only) and the port control strobes, are 5v tolerant inputs at all times. inputs on these pins are ignored while the chip select pin is at logic low. unlike the spi port, the use of chip select is optional with the psp. the cs pin can be tied permanently to v dd if the parallel bus is not shared with other slave devices. this saves one i/o pin from the host controller while leaving the encx24j600 in a perpetually selected state. table 5-1: operating modes supported by the psp interface psp mode availability # pins (1) data width address/data multiplexing control lines theoretical performance @ 10 mhz (mbit/s) 44-pin 64-pin min max 1 x 19 26 8 bit no cs, rd, wr 80 2 x 19 26 8 bit no cs, en, r/w 80 3 x 26 34 16 bit no cs, rd, wrl, wrh 160 4 x 26 34 16 bit no cs, r/w , b0sel, b1sel 160 5 x x 12 19 8 bit yes al, cs, rd, wr <80 6 x x 12 19 8 bit yes al, cs, en, r/w <80 9 x 19 21 16 bit yes al, cs, rd, wrl, wrh <80 10 x 19 21 16 bit yes al, cs, r/w , b0sel, b1sel <80 note 1: includes only address, data and port control strobes. int /spisel and pspcfg pins used for mode configuration are not included. downloaded from: http:///
enc424j600/624j600 ds39935c-page 52 ? 2010 microchip technology inc. 5.2 using the psp interface unlike the serial interface, the psp interface does not use opcodes or a command architecture to control the device. instead, the memory space is accessed directly using the addressing schemes described in section 3.1.2 psp interface maps . control sfrs are read and written to directly, or manipulated through their accompanying bit set and bit clear registers. in 16-bit modes, each address (from 0 to 16,384) points to a different word. the individual write high and write low strobes allow the upper or lower byte of each word to be written individually. 5.2.1 direct and indirect sram buffer access direct addressing allows the host controller to access all sfrs and sram buffer addresses in the encx24j600 memory space directly. this provides the greatest flexibility and speed for accessing the sram buffer. however, this configuration requires up to 15 address pins to be driven by the host controller. this may be prohibitive in smaller, pin-constrained applications. in modes 1 through 6, it is possible to conserve six address pins by tying them to v dd . in this configuration, only the addresses corresponding to the sfr area of the memory space can be directly addressed. the sram buffer memory can still be accessed, but only through the egpdata, erxdata and eudadata data windows in the sfr space, described in section 3.5.5 indirect sram buffer access . indirect buffer access works well for multiplexed modes, such as psp modes 5, 6, 9 and 10. in these modes, the auto-incrementing feature of the data window pointers allows access to the buffer at speeds similar to byte-wise demultiplexed access, since a separate address phase in not required for each byte. the 8-bit psp modes have separate addresses for the low and high bytes of each register. since these modes, therefore, have a longer memory space (i.e., more individual addresses), indirect access requires 9 lines to address all registers between 7e00h and 7fffh. in contrast, the 16-bit modes require only 8 lines to address all of the registers in their sfr range (3f00h to 3fffh). even so, using indirect access still saves six pins in either data width: ad<14:9> in 8-bit modes and ad<13:8> in 16-bit modes. 5.2.2 address latching in multiplexed address/data modes (psp modes 5 through 10), the encx24j600 implements an internal address latch. this allows a reduction in the total number of interface pins by multiplexing the data and addresses that need to be communicated onto a single bus. in 8-bit modes, the address latch is implemented on all of the ad pins. in 16-bit modes, the address latch is implemented for only the ad<13:0> pins. because it spans all required address lines, it is necessary to present the desired address to the encx24j600 for only a brief period while strobing the address latch (al) pin. on 8-bit interfaces, where ad<14:8> are used exclusively for addressing, it is not necessary to drive these upper address lines with a valid address continually through read and write operations. during operation, strobing the al pin high and then low causes the address presented on the ad pins to be saved to the address latch. the address is retained for all future read and write operations. it is retained until either a por event occurs or a subsequent write to the address latch occurs by restrobing al. this allows multiple read and write requests to take place to the same address, without requiring multiple address latching operations. the address latch does not auto-increment after accesses. however, by using the indirect buffer access method, it is possible to sequentially read or write an entire array of sequential sram locations without updating the address latch. 5.2.3 write select pins the 16-bit psp modes make use of either two write pins (wrl and wrh), or a r/w select and two byte lane (b0sel and b1sel) controls. when writing to the device, these pins allow the host controller to instruct whether to write only the low byte, only the high byte or both bytes. if only one write select pin is available on the host con- troller, the high and low selection pins may be tied together to create a single 16-bit write strobe. when this is done, only word writes are possible. however, the host controller can still write single bytes when accessing the sram buffer through the egpdata, erxdata or eudadata window registers, which always perform 8-bit accesses. 5.2.4 unused interface pins any unused psp pins are placed in a high-impedance state, regardless of the state of the cs pin. for maximum esd performance, it is recommended that unused interface pins not be allowed to float. instead, it is recommended that unused interface pins be tied to either v ss or v dd . downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 53 enc424j600/624j600 5.2.5 performance considerations when using a 16-bit data bus width, all registers and direct access to sram can be accomplished through 16-bit accesses. therefore, these modes are poten- tially twice as fast as their 8-bit equivalent parallel mode. however, accesses through the hardware-managed sram read/write registers, egpdata, erxdata and eudadata, are always 8-bit regardless of the interface used. therefore, in many applications, it will not be practically feasible to transfer 16 bits of meaningful data for all bus transfer cycles. when reading from the egpdata, erxdata and eudadata registers on an interface with a multi- plexed address bus, it is possible to latch the address only once and then perform back-to-back reads or writes without performing additional address latch cycles. this can provide a significant performance improvement when sequentially reading or writing an array of data to/from the ram. due to this benefit, 8-bit multiplexed modes (modes 5 and 6) approach the theoretical performance of the demultiplexed psp modes 1 and 2. 5.3 psp modes the eight psp modes are selected using the pspcfg pins. the address/data bus and port control connec- tions differ between the modes, sometimes significantly, as do the timing relationships between address/data and control signals. each of the modes is described in detail in the following sections. 5.3.1 mode 1 psp mode 1 is an 8-bit, fully demultiplexed mode that is available on 64-pin devices only. the parallel inter- face consists of 8 bi-directional data pins (ad<7:0>) and 9 to 15 separate address pins (a<14:0>). to select psp mode 1, tie pspcfg2, pspcfg3 and pspcfg4 to v ss . figure 5-1 shows the connections required. this mode uses active-high read and write strobes (rd and wr) in conjunction with a chip select (cs) signal. these three pins allow the host to select the device, then signal when a read operation is desired or when valid data is being presented to be written. the ad<7:0> pins stay in a high-impedance state any time cs or rd is low. to perform a read operation: 1. raise the cs line (if connected to the host). 2. present the address to be read onto the address bus. 3. raise the rd strobe and wait the required time for the access to occur. when rd is raised high, the data bus begins to drive out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when the rd strobe is lowered, ad<7:0> return to a high-impedance state. to perform a write operation: 1. raise the cs line (if connected to the host). 2. present the address onto the address bus. 3. present the data on the data bus. 4. strobe the wr signal high and then low. for proper operation, do not raise rd and wr simultaneously while the encx24j600 is selected. sample timing diagrams for reading and writing data in this mode are provided in figure 5-2 and figure 5-3, respectively. downloaded from: http:///
enc424j600/624j600 ds39935c-page 54 ? 2010 microchip technology inc. figure 5-1: device conne ctions for psp mode 1 figure 5-2: mode 1 read operation timing (two bytes) figure 5-3: mode 1 write op eration timing (two bytes) host mcu enc624j600 cs (1) rd 100 k ? wr a<14:9> (2) a<8:0> ad<7:0> int /spisel pmcsx pmrd pmwr pma<14:9> pma<8:0> pmd<7:0> intx (3) 6 9 8 pspcfg2 pspcfg3 pspcfg4 note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 3: use of the external interrupt signal to the controller is optional. cs rd a<14:0> ad<7:0> data<7:0> hi-z hi-z address<14:0> address<14:0> data<7:0> hi-z wr t psp1 t psp2 t psp4 t psp3 t psp6 cs rd a<14:0> ad<7:0> data<7:0> hi-z address<14:0> address<14:0> data<7:0> hi-z wr t psp8 t psp9 t psp11 t psp7 t psp10 t psp5 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 55 enc424j600/624j600 5.3.2 mode 2 psp mode 2 is also an 8-bit, fully demultiplexed mode that is available on 64-pin devices only. the parallel interface consists of 8 bidirectional data pins (ad<7:0>) and 9 to 15 separate address pins (a<14:0>). to select psp mode 2, tie pspc fg2 and pspcfg3 to v ss , while connecting pspcfg4 to v dd . figure 5-4 demonstrates connections required to use mode 2. this mode uses a combined read/write (r/w ) select, an enable (en) strobe pin and a separate chip select pin (cs). these three pins allow the host to select the device, indicate whether a read or write operation is desired and signal when valid data is being presented a logic high signal on the r/w pin indicates that a read operation is to be performed when the en strobe is asserted, while a logic low indicates that a write opera- tion is to be performed. the state of r/w only affects the data bus state when the en signal is active. when either cs, en or r/w is driven low, the data bus stays in a high-impedance state. to perform a read operation: 1. raise the cs line (if connected to the host). 2. raise the r/w signal. 3. present the address to be read onto the address bus. 4. raise the en strobe. 5. wait the required time for the access to occur. when en is raised high, the data bus begins to drive out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when the en strobe is low- ered, the data bus pins return to a high-impedance state. to perform a write operation: 1. raise the cs line (if connected to the host). 2. lower the r/w signal. 3. present the address onto the address bus. 4. present the data on the data bus. 5. strobe the en signal high and then low. sample timing diagrams for reading and writing data in this mode are provided in figure 5-5 and figure 5-6, respectively. figure 5-4: device conne ctions for psp mode 2 host mcu enc624j600 cs (1) r/w 100 k ? en a<14:9> (2) a<8:0> ad<7:0> int /spisel pmcsx pmrd/pmwr pmenb pma<14:9> pma<8:0> pmd<7:0> intx (3) 6 9 8 pspcfg2 pspcfg3 pspcfg4 +3.3v note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 3: use of the external interrupt signal to the controller is optional. downloaded from: http:///
enc424j600/624j600 ds39935c-page 56 ? 2010 microchip technology inc. figure 5-5: mode 2 read operation timing (two bytes) figure 5-6: mode 2 write op eration timing (two bytes) cs a<14:0> ad<7:0> data<7:0> hi-z hi-z address<14:0> address<14:0> data<7:0> hi-z en t psp1 t psp2 t psp4 t psp3 r/w t psp6 cs a<14:0> ad<7:0> data<7:0> hi-z address<14:0> address<14:0> data<7:0> hi-z en t psp8 t psp9 t psp11 t psp7 t psp10 t psp5 r/w downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 57 enc424j600/624j600 5.3.3 mode 3 psp mode 3 is a 16-bit, fully demultiplexed mode that is available on 64-pin devices only. the parallel inter- face consists of 16 bidirectional data pins (ad<15:0>) and 8 to 14 separate address pins (a<13:0>). to select psp mode 3, tie pspcfg3 and pspcfg4 to v ss , while connecting pspcfg2 to v dd . figure 5-7 shows the connections required. an active-high rd strobe and two write strobes (wrh and wrl) are utilized in conjunction with a separate chip select (cs). these four pins allow the host to select the device, then signal when a read operation is desired or when valid data is being presented to be written on either the low byte, high byte or both. for proper operation, do not assert cs and rd while simultaneously asserting either wrl or wrh. in psp mode 3, ad<15:0> stay in a high-impedance state any time cs or rd are low. to perform a read operation: 1. raise the cs line (if connected to the host). 2. present the address to be read onto the address bus. 3. raise the rd strobe and wait the required time for the access to occur. when rd is raised high, the data bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when the rd strobe is lowered, the data pins will return to a high-impedance state. the device always outputs a full 16 bits of data for each read request. if only 8 bits of data are required, read the data from the correct pins (ad<15:8> or ad<7:0>) and discard the remaining byte. to perform a write operation: 1. raise the cs line (if connected to the host). 2. present the address onto the a<13:0> address bus. 3. if writing to the low byte of the memory location, present the data on ad<7:0>, and strobe the wrl signal high and then low. 4. if writing to the high byte, present the data on the ad<15:8> and strobe the wrh signal. 5. if writing a whole word, strobe both wrl and wrh simultaneously. sample timing diagrams for reading and writing data in this mode are provided in figure 5-8 and figure 5-9, respectively. figure 5-7: device connections for psp mode 3 host mcu enc624j600 cs (1) rd 100 k ? wrl a<13:8> (3) a<7:0> ad<15:0> int /spisel pmcsx pmrd pmwrl pma<13:8> pma<7:0> pmd<15:0> intx (4) 6 8 16 pspcfg2 pspcfg3 pspcfg4 note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: wrl and wrh may optionally be tied together to form a 16-bit write strobe. see section 5.2.3 write select pins for details. 3: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 4: use of the external interrupt signal to the controller is optional. wrh (2) pmwrh (2) +3.3v downloaded from: http:///
enc424j600/624j600 ds39935c-page 58 ? 2010 microchip technology inc. figure 5-8: mode 3 read oper ation timing (four bytes) figure 5-9: mode 3 write ope ration timing (three bytes) cs rd a<13:0> ad<15:0> data<15:0> hi-z hi-z address<13:0> address<13:0> data<15:0> hi-z wrh t psp1 t psp2 t psp4 t psp3 wrl t psp6 cs rd a<13:0> ad<15:0> data<15:0> hi-z address<13:0> address<13:0> data<7:0> hi-z wrl t psp8 t psp9 t psp11 t psp7 t psp10 t psp5 wrh downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 59 enc424j600/624j600 5.3.4 mode 4 psp mode 4 is also a 16-bit, fully demultiplexed mode that is available in 64-pin devices only. when using psp mode 4, the parallel interface consists of 16 bidirectional data pins (ad<15:0>) and 8 to 14 sep- arate address pins (a<13:0>). to select psp mode 4, tie pspcfg2 and pspcfg4 to v dd , while connecting pspcfg3 to v ss . figure 5-10 shows the connections required. this mode uses a combined read/write (r/w ) select, two byte select (b0sel and b1sel) lines and a sepa- rate chip select (cs) signal. these four pins allow the host to select the device, indicate whether a read or write operation is desired and signal when valid data is being presented for writing on either the low byte, high byte or both. a logic-high signal on r/w indicates that a read opera- tion is to be performed when either the b0sel or b1sel strobe is asserted, while a logic low signal indicates that a write operation is to be performed. the state of r/w only affects the data bus state when either b0sel or b1sel is active. when cs is driven low, r/w is driven low, or both b0sel and b1sel are driven low and the data bus stays in a high-impedance state. to perform a read operation: 1. raise the cs line (if connected to the host). 2. raise the r/w signal. 3. present the address to be read onto the address bus. 4. raise one or both byte select strobes. when either bxsel pin is raised high, the data bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appro- priate read access time has elapsed. when b0sel and b1sel are both low, the data bus pins return to a high-impedance state. the device always outputs a full 16 bits of data for each read request, even if only one byte select is strobed. if only 8 bits of data are required, read the data from the correct pins (ad<15:8> or ad<7:0>) and discard the remaining byte. to perform a write operation: 1. raise the cs line (if connected to the host). 2. lower r/w . 3. present the address onto the address bus. 4. if writing to the low byte of the memory location, present the data on the ad<7:0>; then strobe b0sel high, then low. 5. if writing to the high byte, present the data on ad<15:8> and strobe b1sel. 6. if writing a whole word, strobe both b0sel and b1sel simultaneously. sample timing diagrams for reading and writing data in this mode are provided in figure 5-11 and figure 5-12, respectively. figure 5-10: device conne ctions for psp mode 4 host mcu enc624j600 cs (1) r/w 100 k ? b0sel a<13:8> (3) a<7:0> ad<15:0> int /spisel pmcsx pmrd/pmwr pmenb0 pma<13:8> pma<7:0> pmd<15:0> intx (4) 6 8 16 pspcfg2 pspcfg3 pspcfg4 b1sel (2) pmenb1 (2) +3.3v note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: b0sel and b1sel may optionally be tied together to form a 16-bit write strobe. see section 5.2.3 write select pins for details. 3: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 4: use of the external interrupt signal to the controller is optional. downloaded from: http:///
enc424j600/624j600 ds39935c-page 60 ? 2010 microchip technology inc. figure 5-11: mode 4 read operation timing (four bytes) figure 5-12: mode 4 write ope ration timing (three bytes) cs a<13:0> ad<15:0> data<15:0> hi-z hi-z address<13:0> address<13:0> data<15:0> hi-z b1sel t psp2 t psp3 b0sel t psp1 t psp4 r/w t psp6 cs a<13:0> ad<15:0> data<15:0> hi-z address<13:0> address<13:0> data<7:0> hi-z b1sel t psp9 t psp7 t psp10 t psp5 b0sel t psp8 t psp11 r/w downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 61 enc424j600/624j600 5.3.5 mode 5 psp mode 5 is an 8-bit, partially multiplexed mode that is available on all devices. the parallel interface con- sists of 8 multiplexed address and data pins (ad<7:0>), plus one required high address bit (ad8) and 6 optional address-only pins (ad<14:9>). selecting psp mode 5 differs between 44-pin and 64-pin devices, as shown in figure 5-13. for the 44-pin enc424j600, tie pspcfg0 to v ss . for the 64-pin enc624j600, tie pspcfg1 and pspcfg2 to v ss , and pspcfg3 to v dd . this mode uses active-high read and write (rd and wr) strobes, as well as separate chip select and address latch (cs and al) lines. these four pins allow the host to select the device, latch an address, then indicate when a read or write operation is desired. for proper operation, treat the rd, wr and al strobes as mutually exclusive whenever the encx24j600 is selected. only raise one of these to logic high at any given time. ad<14:8> are used as address inputs only, and are therefore, always left in a high-impedance state. when cs or rd is driven low, the multiplexed ad<7:0> pins stay in a high-impedance state. to perform a read operation: 1. raise cs (if connected to the host). 2. present the address to read from on ad<14:0>. 3. strobe the al pin high and low. 4. set the host controllers ad<7:0> bus pins as inputs. 5. raise rd. the ad<7:0> bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when rd is lowered, the ad<7:0> pins return to a high-impedance state. to perform a write operation: 1. raise cs (if connected to the host). 2. present the address to write to on ad<14:0>. 3. strobe the al pin. 4. change the data on ad<7:0> from the lower address byte to the data to be written. 5. strobe wr high and then low. if a subsequent read or write of the same memory address is desired, it is possible to restrobe rd or wr without going through another address latch cycle. sample timing diagrams for reading and writing data in this mode are provided in figure 5-14 and figure 5-15, respectively. downloaded from: http:///
enc424j600/624j600 ds39935c-page 62 ? 2010 microchip technology inc. figure 5-13: device conne ctions for psp mode 5 host mcu enc424j600 cs (1) rd 100 k ? wr ad<14:9> (2) ad<7:0> int /spisel pmcsx pmrd pmwr pma<14:9> pmd<7:0> intx (3) 6 8 pspcfg0 note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 3: use of the external interrupt signal to the controller is optional. host mcu enc624j600 100 k ? int /spisel intx (3) pspcfg1 pspcfg2 pspcfg3 al pmall cs (1) rdwr pmcsx pmrd pmwr 6 al pmall +3.3v 44-pin devices: 64-pin devices: pma8 ad8 ad<14:9> (2) ad<7:0> pma<14:9> pmd<7:0> 8 pma8 ad8 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 63 enc424j600/624j600 figure 5-14: mode 5 read operation timing (two bytes C same address) figure 5-15: mode 5 write operation timing (two bytes C same address) cs rd ad<14:9> (1) wr al note 1: ad8 must be driven by the host controller. ad<14:9> may be tied to logic high when only indirect access is desir ed. address<14:9> ad8 (1) address<8> ad<7:0> data<7:0> hi-z hi-z hi-z address<7:0> t psp13 t psp12 t psp12 t psp15 t psp2 t psp3 t psp4 data<7:0> t psp14 cs rd ad<14:9> (1) wr al note 1: ad8 must be driven by the host controller. ad<14:9> may be tied to logic high when only indirect ac cess is desired. address<14:9> ad8 (1) address<8> ad<7:0> data<7:0> hi-z hi-z address<7:0> t psp13 t psp12 t psp12 t psp8 t psp10 t psp11 data<7:0> t psp7 t psp14 downloaded from: http:///
enc424j600/624j600 ds39935c-page 64 ? 2010 microchip technology inc. 5.3.6 mode 6 psp mode 6 is also an 8-bit, partially multiplexed mode that is available on all devices. the parallel interface consists of 8 multiplexed address and data pins (ad<7:0>), plus one required high address bit (ad8) and 6 optional address-only pins (ad<14:9>). selecting psp mode 6 differs between 44-pin and 64-pin devices, as shown in figure 5-16. for the 44-pin enc424j600, tie pspcfg0 to v dd . for the 64-pin enc624j600, tie pspcfg 1 and pspcfg3 to v dd , and pspcfg2 to v ss . this mode uses a combined read/write (r/w ) select, an enable (en) strobe and separate chip select (cs) and address latch (al) lines. these four pins allow the host to select the device, latch an address, select either a read or write operation, then assert the enable pin when a read is requested or the data to be written is valid. for proper operation, do not assert en and al simultaneously while the encx24j600 is selected. ad<14:8> are used as address inputs only, and are therefore, always left in a high-impedance state. when cs, r/w or en is driven low, the multiplexed ad<7:0> pins stay in a high-impedance state. to perform a read operation: 1. raise cs (if connected to the host). 2. present the address to read from on ad<14:0>. 3. strobe al high and then low. 4. set the host controllers ad<7:0> bus pins as inputs. 5. raise r/w . 6. raise the en strobe. the ad<7:0> bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when en is lowered, the multiplexed ad<7:0> pins return to a high-impedance state. to perform a write operation: 1. raise cs (if connected to the host). 2. present the address to write to on ad<14:0>. 3. strobe al. 4. lower r/w . 5. change the data on ad<7:0> from the lower address byte to the data to be written. 6. strobe en high, then low. if a subsequent read or write of the same memory address is desired, it is possible to restrobe en without going through another address latch cycle. sample timing diagrams for reading and writing data in this mode are provided in figure 5-17 and figure 5-18, respectively. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 65 enc424j600/624j600 figure 5-16: device conne ctions for psp mode 6 host mcu enc424j600 cs (1) r/w 100 k ? en ad<14:9> (2) ad<7:0> int /spisel pmcsx pmrd/pmwr pmenb pma<14:9> pmd<7:0> intx (3) 6 8 pspcfg0 note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: connect these pins when direct addressing of the entire sram buffer is required. tie to v dd when only indirect addressing is desired. 3: use of the external interrupt signal to the controller is optional. host mcu enc624j600 100 k ? int /spisel intx (3) pspcfg1 pspcfg2 pspcfg3 al pmall 6 +3.3v 44-pin devices: 64-pin devices: pma8 ad8 ad<14:9> (2) ad<7:0> pma<14:9> pmd<7:0> 8 pma8 ad8 +3.3v cs (1) r/w en pmcsx pmrd/pmwr pmenb al pmall downloaded from: http:///
enc424j600/624j600 ds39935c-page 66 ? 2010 microchip technology inc. figure 5-17: mode 6 read operation timing (two bytes C same address) figure 5-18: mode 6 writ e operation timing (two bytes C same address) csen ad<14:9> (1) al note 1: ad8 must be driven by the host controller. ad<14:9> may be tied to logic high when on ly indirect access is desired. address<14:9> ad8 (1) address<8> ad<7:0> data<7:0> hi-z hi-z hi-z address<7:0> t psp13 t psp12 t psp12 t psp15 t psp2 t psp3 t psp4 data<7:0> t psp1 t psp14 r/w cs ad<14:9> (1) en al note 1: ad8 must be driven by the host controller. ad<14:9> may be tied to lo gic high when only indirect access is desired. address<14:9> ad8 (1) address<8> ad<7:0> data<7:0> hi-z hi-z address<7:0> t psp13 t psp12 t psp12 t psp8 t psp10 t psp11 data<7:0> t psp7 t psp5 t psp14 r/w downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 67 enc424j600/624j600 5.3.7 mode 9 psp mode 9 is a 16-bit, fully-multiplexed mode that is available on 64-pin devices only. the parallel interface consists of 16 bidirectional data pins (ad<15:0>); the lower 14 (ad<13:0>) also function as address pins. to select psp mode 9, tie pspcfg2 and pspcfg3 to v dd , while connecting pspcfg1 to v ss . figure 5-19 shows the connections required. this mode uses an active-high read (rd) strobe and two write (wrh and wrl) strobes in conjunction with separate chip select (cs) and address latch (al) inputs. these five pins allow the host to select the device, latch an address and then signal when a read operation is desired or when valid data is being presented to be written to either the low byte, high byte or both. for proper operation while the encx24j600 is selected, do not assert rd or al while simultaneously asserting either wrl or wrh. ad<15:0> stay in a high-impedance state any time cs or rd is low. to perform a read operation: 1. raise cs (if connected to the host). 2. present the address to read from on ad<13:0>. 3. strobe al high, then low. 4. set the host controllers ad<15:0> bus pins as inputs. 5. raise rd. the ad<15:0> bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when rd is lowered, the ad<15:0> pins return to a high-impedance state. the device always outputs a full 16 bits of data for each read request. if only 8 bits of data are required, read the data from the correct pins (ad<15:8> or ad<7:0>) and discard the remaining byte. to perform a write operation: 1. raise cs (if connected to the host). 2. present the address to write to on ad<13:0>. 3. strobe al. 4. if writing to the low byte of the memory location, present the data on ad<7:0>, then strobe wrl high, then low. 5. if writing to the high byte, present the data on ad<15:8>, then strobe wrh. 6. if writing a whole word, strobe both wrl and wrh simultaneously. if a subsequent read or write of the same memory address is desired, it is possible to restrobe rd, wrl or wrh without going through another address latch cycle. sample timing diagrams for reading and writing data in this mode are provided in figure 5-20 and figure 5-21, respectively. figure 5-19: device conne ctions for psp mode 9 host mcu enc624j600 100 k ? ad<15:0> int /spisel pmd<15:0> intx (3) 16 pspcfg1 pspcfg2 pspcfg3 cs (1) rdwrl pmcsx pmrd pmwrl wrh (2) pmwrh (2) al pmall note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: wrl and wrh may optionally be tied together to form a 16-bit write strobe. see section 5.2.3 write select pins for details. 3: use of the external interrupt signal to the controller is optional. +3.3v downloaded from: http:///
enc424j600/624j600 ds39935c-page 68 ? 2010 microchip technology inc. figure 5-20: mode 9 read operation timing (four bytes C same address) figure 5-21: mode 9 writ e operation timing (three bytes C same address) cs rd wrl al ad<15:0> data<15:0> hi-z hi-z hi-z address<13:0> t psp13 t psp12 t psp12 t psp15 t psp2 t psp3 t psp4 data<15:0> wrh t psp14 cs rd wrl al ad<15:0> data<15:0> hi-z hi-z address<13:0> t psp13 t psp12 t psp12 t psp8 t psp10 t psp11 data<7:0> t psp7 wrh t psp14 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 69 enc424j600/624j600 5.3.8 mode 10 psp mode 10 is also a 16-bit, fully-multiplexed mode that is available on 64-pin devices only. the parallel interface consists of 16 bidirectional data pins (ad<15:0>); the lower 14 (ad<13:0>) also function as address pins. to select psp mode 10, tie pspcfg1, pspcfg2 and pspcfg3 to v dd . figure 5-22 shows the connections required. this mode uses an active-high read/write (r/w ) select and two byte select (b0sel and b1sel) strobes in conjunction with separate chip select (cs) and address latch (al) inputs. these five pins allow the host to select the device, latch an address, select either a read or write operation, then assert the proper byte select strobe(s) to perform the operation. a logic high signal on the r/w pin indicates that a read operation is to be performed when either the b0sel or b1sel strobe is asserted, while a logic low signal indicates that a write operation is to be performed. for proper operation while the encx24j600 is selected, the host controller should not assert al while simultaneously asserting either b0sel or b1sel. the state of r/w only affects the ad<15:0> bus state when either b0sel or b1sel is active. when cs is driven low, r/w is driven low, or both b0sel and b1sel are driven low, ad<15:0> stays in a high-impedance state. to perform a read operation: 1. raise cs (if connected to the host). 2. present the address to be read onto ad<13:0>. 3. strobe al high, then low. 4. raise r/w . 5. set the host controllers ad<15:0> bus pins as inputs. 6. raise either b0sel or b1sel, or both. when either bxsel pin is raised high, the ad<15:0> bus begins driving out indeterminate data for a brief period, then switches to the correct read data after the appropriate read access time has elapsed. when b0sel and b1sel are both low, ad<15:0> return to a high-impedance state. the device always outputs a full 16 bits of data for each read request, even if only one byte select is strobed. if only 8 bits of data are required, read the data from the correct pins (ad<15:8> or ad<7:0>) and discard the remaining byte. to perform a write operation: 1. raise cs (if connected to the host). 2. present the address to write to on ad<13:0>. 3. strobe al. 4. lower r/w . 5. if writing to the low byte of the memory location, present the data on ad<7:0>, then strobe b0sel. 6. if writing to the high byte, present the data on ad<15:8>, then strobe the b1sel signal. 7. if writing a whole word, strobe both b0sel and b1sel simultaneously. if a subsequent read or write of the same memory address is desired, it is possible to restrobe b0sel or b1sel without going through another address latch cycle. sample timing diagrams for reading and writing data in this mode are provided in figure 5-23 and figure 5-24, respectively. figure 5-22: device conne ctions for psp mode 1 host mcu enc624j600 ad<15:0> pmd<15:0> 16 100 k ? int /spisel intx (3) pspcfg1 pspcfg2 pspcfg3 +3.3v cs (1) r/w b0sel pmcsx pmrd/pmwr pmenb0 b1sel (2) pmenb1 (2) al pmall note 1: use of the cs strobe from the controller is optional. if not used, tie cs to v dd . 2: b0sel and b1sel may optionally be tied together to form a 16-bit write strobe. see section 5.2.3 write select pins for details. 3: use of the external interrupt signal to the controller is optional. downloaded from: http:///
enc424j600/624j600 ds39935c-page 70 ? 2010 microchip technology inc. figure 5-23: mode 10 read operation timing (fo ur bytes C same address) figure 5-24: mode 10 writ e operation timing (three bytes C same address) cs b0sel al ad<15:0> data<15:0> hi-z hi-z hi-z address<13:0> t psp13 t psp12 t psp12 t psp15 t psp2 t psp3 t psp4 data<15:0> b1sel t psp1 t psp14 r/w cs b0sel al ad<15:0> data<15:0> hi-z hi-z address<13:0> t psp13 t psp12 t psp8 t psp10 t psp11 data<7:0> b1sel t psp5 t psp14 r/w t psp12 t psp7 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 71 enc424j600/624j600 6.0 ethernet overview before discussing the use of enc424j600/624j600 devices in ethernet applications, it may be helpful to review the structure of a typical data frame. for more detailed information, refer to ieee 802.3 standard, which defines the ethernet protocol, or to microchip application note an1120, ethernet theory of operation . 6.1 frame format ethernet communications utilize a series of frames to transmit data between nodes. (these frames are also commonly referred to as packets, and in the context of this document, the two terms will be used interchange- ably.) compliant ethernet frames are between 64 and 1518 bytes long. they consist of five or six different fields: a destination mac address, source mac address, type/length field, data payload, optional padding field and a cyclic redundancy check (crc). additionally, when transmitted on the ethernet medium, a start of stream/preamble field and a start-of-frame (sof) delimiter byte are appended to the beginning of the ethernet frame. thus, traffic seen on the twisted-pair cabling will appear as shown in figure 6-1. 6.1.1 start of stream/preamble and start-of-frame delimiter when using enc424j600/624j600 devices, the start of stream/preamble and start-of-frame delimiter fields are automatically generated for transmitted frames and stripped from received ones. these bytes are not written to the data buffer and the host controller does not need to account for these bytes. 6.1.2 destination address the destination address is a 6-byte field containing the mac address of the device to which the frame is directed. if the least significant bit in the first byte of this address is clear (i.e., the first byte of the address is even), the address is a unicast address. for example, 00-00-ba-be-f0-0d and 32-45-de-ad-be-ef unicast addresses, while 01-00-ba-be-f0-0d and 33-45-de-ad-be-ef are not. frames with a unicast destination are designated for usage by the addressed node only. figure 6-1: ethernet packet format sa padding fcs (1) number field comments 6 46-1500 4 da destination address, such as multicast, broadcast or unicast source address packet payload frame check sequence C crc type/length data of bytes 62 type of packet or the length of the packet (with optional padding) 7 filtered out by the module sfd 1 start-of-frame delimiter (filtered out by the module) used in the calculation of the fcs note 1: the fcs is transmitted starting with bit 31 and ending with bit 0. preamble start of stream/ downloaded from: http:///
enc424j600/624j600 ds39935c-page 72 ? 2010 microchip technology inc. if the least significant bit in the first byte of this address is set (i.e., the byte is odd), the address is a multicast destination. from the previous example, 01-00-ba-be-f0-0d and 33-45-de-ad-be-ef are multicast addresses. multicast frames are designated for use by a selected group of ethernet nodes. the multicast address, ff-ff-ff-ff-ff-ff, is reserved; it is known as the broadcast address and is directed to all nodes on the network. enc424j600/624j600 devices incorporate several packet filters which can be configured to accept or dis- card unicast, multicast and/or broadcast frames. for details about these and other receive filters, refer to section 10.0 receive filters . when transmitting frames, the host controller is responsible for writing the desired destination address into the transmit buffer. 6.1.3 source address the source address is a 6-byte field containing the mac address of the node which transmitted the ether- net frame. every ethernet device must have a globally unique mac address. each enc424j600/624j600 device has a unique address which is loaded into the maadr registers on power-up. this value can be used as is, or the registers may be reconfigured with a different address. 6.1.4 type/length the type/length field is a 2-byte field indicating the pro- tocol to which the frame belongs. applications using standards such as internet protocol (ip) or address resolution protocol (arp) should use the type code specified in the appropriate standards document. alternately, this field can be used as a length field when implementing proprietary networks. typically, any value of 1500 (05dch) or smaller is considered to be a length field and specifies the amount of non-padding data which follows in the data field. 6.1.5 data the data field typically consists of between 0 and 1500 bytes of payload data for each frame. enc424j600/624j600 devices are capable of trans- mitting and receiving frames larger than this when the huge frame enable bit, hfrmen (macon2<2>), is set. however, these larger data frames violate ethernet specifications and will likely be dropped by most ethernet nodes. 6.1.6 padding the padding field is a variable length field appended to meet ieee 802.3 specification requirements when transmitting small data payloads. as mentioned, the minimum ethernet frame size is 64 bytes. removing the 18 bytes of address and type information, and the terminating 4-byte crc, leaves a minimum of 46 bytes. smaller frames must be padded to fill this space. when transmitting frames, enc424j600/624j600 devices can automatically generate zero padding if the padcfg<2:0> bits (macon2<7:5>) are configured to do so. otherwise, the application must append the appropriate padding. the device will not prevent the transmission of these runt frames if the host commands such an action, but the frame is likely to be dropped by other nodes. when receiving frames, enc424j600/624j600 devices accept and write all padding to the receive buffer. frames shorter than the required 64 bytes can optionally be filtered by the runt error reject filter, described in section 10.4 runt error rejection filter . 6.1.7 crc the crc is a 4-byte field containing a standard 32-bit crc calculated over the destination, source, type, data and padding fields. it allows for the detection of transmission errors. when transmitting frames, enc424j600/624j600 devices can automatically generate and append a valid crc if the padcfg<2:0> bits are configured to do so. otherwise, the host controller must generate and append this value. it is strongly recommended that the padcfg bits be configured so that the hardware automatically manages this field. when receiving frames, enc424j600/624j600 devices accept and write the crc field to the receive buffer. frames with invalid crc values can be discarded by the crc error rejection filter, described in section 10.3 crc error rejection filter . downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 73 enc424j600/624j600 7.0 reset enc424j600/624j600 differentiates between five types of resets: power-on reset (por) system reset transmit only reset receive only reset phy subsystem reset a simplified block diagram of the on-chip reset circuit is shown in figure 7-1. 7.1 power-on reset power-on reset occurs when v dd rises above v por . this allows the device to start in the initialized state when v dd is adequate for the devices digital logic to operate correctly. the por circuitry is always enabled. to ensure proper por operation, the application circuit must meet the specified minimum rise rate of v dd (sv dd , dc parameter d003). after a power-on reset, the contents of the sram buffer and cryptographic memories are unknown. however, all registers will be loaded with their specified reset values. the phy and other logic should still not be accessed immediately after the por. see section 8.1 reset for the recommended reset procedure. 7.2 system reset a system reset reverts all registers back to their default reset values, with the exception of cocon<3:0> (econ2<11:8>), which controls the frequency output on clkout. all transmit, receive, mac, phy, dma and cryptographic logic are reset. additionally, if the spi interface is used, the current internal bank selection is reset to bank 0. the packet buffer, cryptographic memories and the psp address latch used in multiplexed parallel modes are unaffected by a system reset. to initiate a system reset, set the ethrst bit (econ2<4>). the bit is automatically cleared by hardware. after setting ethrst, a delay of 25 ? s is required before the encx24j600 can be accessed again through the spi or psp interfaces. additionally, all phy registers and status bits derived from the phy should not be accessed or used for an additional period of 256 ? s. a system reset does not cause the spisel and pspcfgx pin states to be relatched. therefore, the cur- rently selected controller interface remains available after issuing a system reset and waiting the required 25 ? s. figure 7-1: on-chip reset circuit por reset sfrs and reset tx reset rx transmit reset receive reset system reset (ethrst) reset i/o interface and clkout reset phy phy reset (txrst) (rxrst) (prst) spi bank select downloaded from: http:///
enc424j600/624j600 ds39935c-page 74 ? 2010 microchip technology inc. 7.3 transmit only reset a transmit only reset is performed by setting the txrst bit (econ2<6>). the transmit logic is held in reset until the bit is cleared. any pending transmission is aborted and txrts (econ1<1>) is cleared. to resume normal operation, clear the txrst bit. both the por and system resets automatically perform a transmit reset, so this step does not need to be per- formed after a system or power-on reset. only the transmit logic is affected by this operation. other register and control blocks are not affected by this event. 7.4 receive only reset a receive only reset is performed by setting the rxrst bit (econ2<5>). the receive logic is held in reset until the bit is cleared. any packet being received is aborted and rxen (econ1<0>) is cleared. to resume normal operation, clear the rxrst bit. both the por and system resets automatically perform a receive reset, so this step does not need to be per- formed after a system or power-on reset. only the receive logic is affected by this operation. other register and control blocks are not affected by this event. following a receive only reset, it is necessary to manually reconfigure the rx sfrs for normal receive operation again. for example, applications must clear the pktcnt field in estat by setting the pktdec bit (econ1<8>) enough times for the count to reach zero. similarly, applications must reset the erxst and erxtail pointers before enabling reception again with the rxen bit. 7.5 phy subsystem reset the phy module may be reset by setting the prst bit (phcon1<15>). the phy register contents all revert to their default values. unlike the transmit and receive only resets, the phy cannot be removed from reset immediately after setting prst. the phy requires a delay, after which the hardware automatically clears the prst bit. it is recom- mended that, after issuing a reset, the host controller polls prst and waits for it to be cleared by hardware before using the phy. the por and system resets automatically perform a phy reset, so this step does not need to be performed after a system or power-on reset. only the phy is affected by this operation. other register and control blocks are not affected by this event. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 75 enc424j600/624j600 8.0 initialization before using an encx24j600 device to transmit and receive packets, certain device settings must be initial- ized. depending on the application, some configuration options may be left set to their default values. those that need to be changed are typically set once after power-up and not changed thereafter. 8.1 reset because it is possible for the host controller to reset independently from the encx24j600 (for example, when using an external debugger to reprogram the host), it is recommended that software issue a system reset of the encx24j600 as the first step of its ordinary initialization routine. also, since it is possible for the host controller to exit its por, begin code execution before the encx24j600 exits por and latches the interface mode, special care should be taken in the software to ensure that it does not attempt to blindly initialize the encx24j600 registers before the device is actually out of reset. to take care of these potential pitfalls, it is recommended that firmware take a write-verify-reset-reverify approach to ensure proper start-up. for example: 1. write 1234h to eudast. 2. read eudast to see if it now equals 1234h. if it does not, the spi/psp interface may not be ready yet, so return to step 1 and try again. 3. poll clkrdy (estat<12>) and wait for it to become set. 4. issue a system reset command by setting ethrst (econ2<4>). 5. in software, wait at least 25 ? s for the reset to take place and the spi/psp interface to begin operating again. 6. read eudast to confirm that the system reset took place. eudast should have reverted back to its reset default of 0000h. 7. wait at least 256 ? s for the phy registers and phy status bits to become available. the encx24j600 is now ready to accept further commands. 8.2 clkout frequency if the encx24j600 is providing a system clock for the host controller, or other hardware features of the application, it is recommended that the application con- figure the output frequency on the clkout pin first. the frequency is set by using the cocon<3:0> bits (econ2<11:8>). by default, the output frequency on clkout after a por is 4 mhz. the last programmed frequency is maintained after all other reset events. for more information on using the output of the clkout pin, see section 2.2 clkout pin . 8.3 receive buffer before packet reception is enabled, the receive buffer must be configured by programming the erxst pointer. all memory between this pointer and the end of the physical memory (5fffh), including those addresses, are reserved as the receive buffer for incoming packets. the value of erxst must be word-aligned, since all incoming frames must be stored beginning at even addresses. if an application expects a large amount of incoming traffic or frequent packet delivery, it is recommended that it allocate a larger receive buffer. applications needing more space for saving old packets or other temporary storage, or wishing to hold several packets ready for transmission, can allocate less memory for the receive buffer. reception of incoming packets begins at the address designated by erxst. 8.4 transmit buffer no specific transmit buffer is defined. the host applica- tions may write frames to be transmitted to any unused space in the sram buffer; no initialization is necessary. 8.5 receive filters before enabling packet reception, configure the receive filters to eliminate unwanted incoming packets. see section 10.0 receive filters for details. 8.6 mac initialization once the receive buffer and filters are properly configured, several mac registers must be configured. the order of programming is unimportant. if flow control operation is desired, configure the flow control module as described in section 11.0 flow control . verify that the txcrcen (macon2<4>) and padcfg<2:0> (macon2<7:5>) bits are set correctly. most applications will not need to modify these settings from their power-on defaults. program the mamxfl register with the maximum frame length to be accepted (received or transmit- ted). most network nodes are configured to handle packets that are 1518 bytes or less (1522 bytes or less if vlan tagging is used). alternately, set hfrmen (macon2<2>) to accept any size frame. set the rxen bit (econ1<0>) to enable packet reception by the mac. downloaded from: http:///
enc424j600/624j600 ds39935c-page 76 ? 2010 microchip technology inc. 8.6.1 preprogrammed mac address as shipped, each encx24j600 device has been preprogrammed with a unique mac address. this value is stored in nonvolatile memory and reloaded into the maadr registers after every power-on and system reset. the factory preprogrammed mac address is permanent and will be restored to the mac registers after each reset. the preprogrammed address in nonvolatile memory cannot be changed by the user, but it can be over- written in the sfrs. if the user requires a different mac address value, the maadr registers will need to be written with the new mac values by the host application after each reset. 8.7 phy initialization depending on the application, the phy may need to be configured during initialization. typically, when using auto-negotiation, users should write 0x05e1 to phana to advertise flow control capability. only special test code, such as when attempting to do loopback tests, needs other settings in the phy to be reconfigured. 8.8 other considerations following reset beyond the steps already described, there are addi- tional configuration options that may need to be adjusted following a device reset. normally, the default configurations of these items on power-on reset do not need to be changed. for half-duplex mode: verify that defer (macon2<14>), bpen (macon2<13>) and nobkoff (macon2<12>) are set correctly. these bits only apply when operating in half-duplex mode; most applications do not need to modify these settings from their power-on defaults. for ieee 802.3 compliance, keep the defer bit set. configure the non-back-to-back inter-packet gap register, maipg (register 8-5). most applica- tions program this register to 12h, which selects maximum performance while complying with the ieee 802.3 ipg previously specified. set the maxret<3:0> (maclcon<3:0>) bits to select the maximum number of retransmission attempts after a collision is detected. most applications do not need to change this from the default value. for full-duplex mode: configure the low byte of the non-back-to-back inter-packet gap register, maipgl. most applica- tions program this register to 12h, which selects maximum performance while complying with the ieee 802.3 ipg previously specified. 8.9 after link establishment several mac configuration parameters are dependent upon the current duplex mode of the link. once auto-negotiation completes, or the speed and duplex modes are manually reconfigured, these registers must be updated accordingly. for details about auto-negotiation and manual speed/duplex configuration, refer to section 12.0 speed/duplex configuration and auto-negotiation . once these steps are performed, packet reception is re-enabled by setting rxen (econ1<0>). the host controller may also begin to transmit packets as described in section 9.1 transmitting packets . before transmitting the first packet after link establish- ment or auto-negotiation, t he mac duplex configuration must be manually set to match the duplex configuration of the phy. to do this, configure fuldpx (macon2<0>) to match phydpx (estat<10>). for half-duplex mode, configure the back-to-back inter-packet gap register, mabbipg (register 8-4), to set the nibble time offset delay between the end of one transmission and the beginning of the next in a back-to-back sequence. program the register value as the desired period in nibble times, minus 6. most applications will program this register to 12h, which represents the minimum inter-packet gap (ipg) specified by ieee 802.3, of 0.96 ? s (at 100 mb/s) or 9.6 ? s (at 10 mb/s). for full-duplex mode, configure the back-to-back inter-packet gap register, mabbipg, to set the nibble time offset delay between the end of one transmission and the beginning of the next in a back-to-back sequence. the register value should be programmed as the desired period in nibble times, minus 3. most applications will program this register to 15h, which represents the minimum ieee 802.3 specified inter-packet gap (ipg) of 0.96 ? s (at 100 mb/s) or 9.6 ? s (at 10 mb/s). downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 77 enc424j600/624j600 register 8-1: econ2: ethe rnet control register 2 r/w-1 r/w-1 r/w-0 r/w-0 r/w-1 (1) r/w-0 (1) r/w-1 (1) r/w-1 (1) ethen strch txmac sha1md5 cocon3 cocon2 cocon1 cocon0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 autofc txrst rxrst ethrst modlen1 modlen0 aeslen1 aeslen0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ethen: ethernet enable bit 1 = device is enabled (normal operation) 0 = device is disabled (reduced power) bit 14 strch: led stretching enable bit 1 = stretch transmit, receive and collision events on leda and ledb to 50 ms 0 = leda and ledb outputs show real-time status without stretching bit 13 txmac: automatically transmit mac address enable bit 1 = maadr1-maadr6 registers are automatically inserted into the source address field of all transmitted packets 0 = no automatic source address insertion bit 12 sha1md5: sha-1/md5 hash control bit 1 = hashing engine computes a sha-1 hash 0 = hashing engine computes an md5 hash bit 11-8 cocon<3:0>: clkout frequency control bits (1) 1111 = 50 khz nominal ((4 * f osc )/2000) 1110 = 100 khz nominal ((4 * f osc )/1000) 1101 = no output (dc sinking to v ss ) 1100 = 3.125 mhz nominal ((4 * f osc )/32) 1011 = 4.000 mhz nominal ((4 * f osc )/25) 1010 = 5.000 mhz nominal ((4 * f osc )/20) 1001 = 6.250 mhz nominal ((4 * f osc )/16) 1000 = 8.000 mhz nominal ((4 * f osc )/12.5); duty cycle is not 50% 0111 = 8.333 mhz nominal ((4 * f osc )/12) 0110 = 10.00 mhz nominal ((4 * f osc )/10) 0101 = 12.50 mhz nominal ((4 * f osc )/8) 0100 = 16.67 mhz nominal ((4 * f osc )/6) 0011 = 20.00 mhz nominal ((4 * f osc )/5) 0010 = 25.00 mhz nominal ((4 * f osc )/4) 0001 = 33.33 mhz nominal ((4 * f osc )/3) 0000 = no output (dc sinking to v ss ) bit 7 autofc: automatic flow control enable bit 1 = automatic flow control is enabled 0 = automatic flow control is disabled bit 6 txrst: transmit logic reset bit 1 = transmit logic is held in reset. txrts (econ1<1>) is automatically cleared by hardware when this bit is set. 0 = transmit logic is not in reset (normal operation) note 1: reset value on por events only. all other resets leave these bits unchanged. downloaded from: http:///
enc424j600/624j600 ds39935c-page 78 ? 2010 microchip technology inc. bit 6 rxrst: receive logic reset bit 1 = receive logic is held in reset. rxen (econ1<0>) is automatically cleared by hardware when this bit is set. 0 = receive logic is not in reset (normal operation) bit 4 ethrst: master ethernet reset bit 1 = all tx, rx, mac, phy, dma, modular exponentiation, hashing and aes logic, and registers (excluding cocon) are reset. hardware self-clears this bit to 0 . after setting this bit, wait at least 25 ? s before attempting to read or write to the encx24j600 via the spi or psp interface. 0 = device is not in reset (normal operation) bit 3-2 modlen<1:0>: modular exponentiation length control bits 11 = reserved 10 = 1024-bit modulus and operands 01 = 768-bit modulus and operands 00 = 512-bit modulus and operands bit 1-0 aeslen<1:0>: aes key length control bits 11 = reserved 10 = 256-bit key 01 = 192-bit key 00 = 128-bit key register 8-1: econ2: ethernet control register 2 (continued) note 1: reset value on por events only. all other resets leave these bits unchanged. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 79 enc424j600/624j600 register 8-2: eidled: ethernet id status/led control register r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 lacfg3 lacfg2 lacfg1 lacfg0 lbcfg3 lbcfg2 lbcfg1 lbcfg0 bit 15 bit 8 r - 0r - 0r - 1rrrrr devid2 devid1 devid0 revid4 revid3 revid2 revid1 revid0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12, bit 11-8 lacfg<3:0>: leda configuration bits and lbcfg<3:0: ledb configuration bits 1111 = display link and speed state, transmit and receive events (1) 1110 = display link and duplex state, transmit and receive events (1) 1101 = reserved 1100 = display link state, collision events; pin is driven high when a link is present and driven low temporarily when a collision occurs 1011 = display link state, transmit and receive events; pin is driven high when a link is present and driven low while a packet is being received or transmitted 1010 = display link state, receive events; pin is driven high when a link is present and driven low while a packet is being received 1001 = display link state, transmit events; pin is driven high when a link is present and driven low while a packet is being transmitted 1000 = display speed state; pin is driven high when in 100 mbps mode and a link is present 0111 = display duplex state; pin is driven high when the phy is in full duplex (phydpx (estat<10> ) is 1 ) and a link is present 0110 = display transmit and receive events; pin is driven high while a packet is either being received or transmitted 0101 = display receive events; pin is driven high while a packet is being received 0100 = display transmit events; pin is driven high while a packet is being transmitted 0011 = display collision events; pin is temporarily driven high when a colli sion occurs 0010 = display link state; pin is driven high when linked 0001 = on (pin is driven high) 0000 = off (pin is driven low) bit 7-5 devid<2:0>: device id bits 001 = enc624j600 family device bit 4-0 revid<4:0>: silicon revision id bits indicates current silicon revision. note 1: these configurations require that a bi-color led be connected between the leda and ledb pins, and that lacfg<3:0> and lbcfg<3:0> be set to the same value. see section 2.5.1 using bi-color leds for detailed information. downloaded from: http:///
enc424j600/624j600 ds39935c-page 80 ? 2010 microchip technology inc. register 8-3: macon2: mac control register 2 u-0 r/w-1 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 defer bpen nobkoff r r bit 15 bit 8 r/w-1 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 padcfg2 padcfg1 padcfg0 txcrcen phdren hfrmen r fuldpx bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14 defer: defer transmission enable bit (applies to half duplex only) 1 = when the medium is occupied, the mac will wait indefinitely for it to become free when attempting to transmit (use this setting for ieee 802.3 compliance) 0 = when the medium is occupied, the mac will abort the transmission after the excessive deferral limit is reached (24,288 bit times) bit 13 bpen: no backoff during back pressure enable bit (applies to half duplex only) 1 = after incidentally causing a collision during back pressure, the mac immediat ely begins retransmitting 0 = after incidentally causing a collision during backpressure, the mac delays using the binary exponential backoff algorithm before attempting to retransmit (normal operation) bit 12 nobkoff: no backoff enable bit (applies to half duplex only) 1 = after any collision, the mac immediately begins retransmitting 0 = after any collision, the mac delays using the binary exponential backoff al gorithm before attempting to retransmit (normal operation) bit 11-10 unimplemented: read as 0 bit 9-8 reserved: write as 0 bit 7-5 padcfg<2:0>: automatic pad and crc configuration bits 111 = all short frames are zero-padded to 64 bytes and a valid crc is then appen ded 110 = no automatic padding of short frames 101 = mac automatically detects vlan protocol frames which have a 8100h type field and auto- matically pad to 64 bytes. if the frame is not a vlan frame, it will be padded to 60 bytes. afte r padding, a valid crc is appended. 100 = no automatic padding of short frames 011 = all short frames are zero-padded to 64 bytes and a valid crc is then appen ded 010 = no automatic padding of short frames 001 = all short frames will be zero-padded to 60 bytes and a valid crc is then app ended 000 = no automatic padding of short frames bit 4 txcrcen: transmit crc enable bit 1 = mac appends a valid crc to all frames transmitted regardless of the padcfg b its. txcrcen must be set if the padcfg bits specify that a valid crc will be appended. 0 = mac does not append a crc. the last 4 bytes are checked and if it is an inval id crc, it is to be reported by setting crcbad (etxstat<4>). bit 3 phdren: proprietary header enable bit 1 = frames presented to the mac contain a 4-byte proprietary header which is not used when calculating the crc 0 = no proprietary header is present; the crc covers all data (normal operatio n) downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 81 enc424j600/624j600 bit 2 hfrmen: huge frame enable bit 1 = frames of any size will be allowed to be transmitted and received 0 = frames bigger than mamxfl will be aborted when transmitted or received bit 1 reserved: write as 1 bit 0 fuldpx: mac full-duplex enable bit 1 = mac operates in full-duplex mode. for proper operation, the phy must also be set to full-duplex mode. 0 = mac operates in half-duplex mode. for proper operation, the phy must also be set to half-duplex mode. register 8-3: macon2: mac control register 2 (continued) register 8-4: mabbipg: mac back-to-back inter-packet gap register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 bbipg6 bbipg5 bbipg4 bbipg3 bbipg2 bbipg1 bbipg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 bbipg<6:0>: back-to-back inter-packet gap delay time control bits when fuldpx (macon2<0>) = 1 : nibble time offset delay between the end of one transmission and the beginning of the next in a back-to-back sequence. the register value should be programmed to the desired period in nibble times minus 3. the recommended setting is 15h which represents the minimum ieee specified inter-packet gap (ipg) of 0.96 ? s (at 100 mb/s) or 9.6 ? s (at 10 mb/s). when fuldpx (macon2<0>) = 0 : nibble time offset delay between the end of one transmission and the beginning of the next in a back-to-back sequence. the register value should be programmed to the desired period in nibble times minus 6. the recommended setting is 12h which represents the minimum ieee specified inter-packet gap (ipg) of 0.96 ? s (at 100 mb/s) or 9.6 ? s (at 10 mb/s). downloaded from: http:///
enc424j600/624j600 ds39935c-page 82 ? 2010 microchip technology inc. register 8-5: maipg: mac inter-packet gap register u-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r r r r r r r bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 ipg6 ipg5 ipg4 ipg3 ipg2 ipg1 ipg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 reserved: write as 0001100 (0ch) bit 7 unimplemented: read as 0 bit 6-0 ipg<6:0>: non back-to-back inter-packet gap delay time control bits inter-packet gap (ipg) between the end of one packet received or transmitted and the start of the next packet transmitted. for maximum performance while meeting ieee 802.3 compliance, leave this fi eld set to 12h, which represents an inter-packet gap time of 0.96 ? s (at 100 mb/s) or 9.6 ? s (at 10 mb/s). register 8-6: maclcon: mac colision control register u-0 u-0 r/w-1 r/w-1 r/w-0 r/w-1 r/w-1 r/w-1 r r r r r r bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-1 r/w-1 r/w-1 r/w-1 maxret3 maxret2 maxret1 maxret0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 reserved: write as 110111 (37h) bit 7-4 unimplemented: read as 0 bit 3-0 maxret<3:0>: maximum retransmissions control bits (half duplex only) maximum retransmission attempts the mac will make before aborting a packet due to excessive collisions. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 83 enc424j600/624j600 9.0 transmitting and receiving packets beyond providing the transceiver interface to the network medium, enc424j600/624j600 devices also handle many of the mechanical tasks of packet management, off-loading much of the routine ethernet housekeeping from the host application. the device manages the separate transmit and receive buffers, handles transmission and potential collisions, filters incoming packets, and stores received packets with the additional information required for processing. the host controller writes data to the memory, configures the length of the packet to send, initiates the transmis- sions and reads incoming packets from the receive buffer. padding and checksum generation, as well as status information on received packets, are all handled automatically. 9.1 transmitting packets the general purpose buffer is bounded by the begin- ning of the address space (0000h) and the last byte before the beginning of the receive buffer (erxst C 1). since erxst must be word-aligned, both buffers start on even addresses and end on odd addresses. for details on buffer allocation, see section 3.5 sram buffer . the packet to be transmitted is defined by two values: the transmit data start pointer, etxst, and the transmit buffer length pointer, etxlen. when trans- mitting a packet, the device reads the etxlen bytes, beginning at the address indicated by etxst. if the end of the general purpose buffer is encountered during this process, the operation will wrap around to the beginning of the general purpose buffer space (0000h). packets can also be transmitted directly from the receive buffer (for instance, when changing the source and destination addresses). if the end of the receive buffer is encountered, the operation wraps to the beginning of the receive buffer instead. this wrap-around behavior precludes packets from spanning both buffers. figure 9-1 shows three examples of the wrapping behavior. packet 1 in the diagram is transmitted without any wrapping. packet 2 reaches the end of the general purpose buffer, and therefore, wraps to address 0000h. packet 3 is being transmitted from the receive buffer, and therefore, wraps to erxst when the end of the receive buffer is reached. the device can be configured to insert the source mac address using the values from the maadr registers. this feature is enabled by setting the txmac bit (econ2<13>). when enabled, the device reads the 6-byte destination address from memory, inserts the 6-byte source mac address from the maadr registers into the transmitted byte stream, then continues reading and transmitting the remaining bytes from memory. figure 9-1: examples of tx buffer wrapping the value of etxlen only indicates the number of bytes to read from memory, not the number of bytes to be transmitted. if the device is configured to insert the source mac address, add padding or append the crc; the actual number of bytes transmitted on the physical medium will increase. figure 9-2 shows how to configure etxlen for three identical packets of data when various transmission options are configured. before transmitting any packets, the device needs to be initialized (see section 8.0 initialization ). setting txrts (econ1<1>) initiates the transmission. this bit is automatically cleared by hardware when the opera- tion is complete. in addition, the device can also be configured to assert the txif interrupt and the external interrupt signal on completion (see section 13.0 interrupts for additional details). transmission operations can be aborted by manually clearing the txrts bit at any time. if a packet transmis- sion is in progress, it will be aborted immediately and the device will send a jam signal, effectively notifying the link partner to discard any partial packet it has received. packet 1 packet 2 0000h erxst 5fffh general buffer packet 2 (cont.) receive buffer 0100h 4200h 4600h 4800h packet 3 (cont.) packet 3 4900h 5f00h example packet etxst etxlen 1 4200h 1024 2 4600h 768 3 5f00h 512 purpose downloaded from: http:///
enc424j600/624j600 ds39935c-page 84 ? 2010 microchip technology inc. figure 9-2: examples for selecting etxlen values 00 1f 2e 3d 4c 5b 00 04 a3 11 22 33 80 00 00 01 02 28 00 00 00 00 00 00 1f 2e 3d ... destination address source address protocol data padding next packet mac address insertion disabled (txmac = 0 ) automatic padding disabled (padcfg<2:0> = 000 ) crc generation enabled (txcrcen = 1 ) 80 00 00 01 02 28 00 00 00 00 00 00 1f 2e 3d ... destination address protocol data padding next packet mac address insertion enabled (txmac = 1 ) automatic padding disabled (padcfg<2:0> = 000 ) crc generation enabled (txcrcen = 1 ) 80 00 00 01 02 28 00 1f 2e 3d ... destination address data protocol next packet mac insertion enabled (txmac = 1 ) automatic padding enabled (padcfg<2:0> = 101 ) crc generation enabled (txcrcen = 1 ) ... ... ... 00 1f 2e 3d 4c 5b 00 1f 2e 3d 4c 5b 0120h 0130h 0156h 015bh 0120h 012ah 0150h 0155h 0120h 012ah 0150h example 1: source address and pa dding provided by application etxst = 0120h etxlen = 3ch example 2: padding provided by application, source address to be inserted by encx24j600 example 3: source address and padding to be inserted by encx24j600 etxst = 0120h etxlen = 36h etxst = 0120h etxlen = 31h downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 85 enc424j600/624j600 while transmission is active (txrts is set), it is recom- mended that etxst and etxlen, as well as the txmac bit (econ2<13>), not be modified. since erxst controls the end of the transmit buffer, and therefore, buffer wrap-around, it must also remain unchanged. to transmit a packet: 1. initialize the mac as described in section 8.6 mac initialization . most applications should leave padcfg<3:0> and txcrcen set to their default values, which enables automatic padding and crc generation. for automatic insertion of the source mac address during transmission, set the txmac bit to 1 . 2. if desired, enable the transmit done and/or transmit abort interrupts by setting txie and/or txabtie (eie<3:2>). clear txif and txabtif (eir<3:2>) if they are currently set. to generate the interrupt, also set intie (eie<15>). 3. copy the packet to the sram buffer. 4. program etxst to the start address of the packet. 5. program etxlen with the length of data copied to the memory. 6. set the txrts bit to initiate transmission. 7. wait for the hardware to clear txrts and trigger a transmit interrupt, indicating transmission has completed. 8. read the etxstat register for status information as described in the next section. the transmit function does not modify the etxst pointer or etxlen data length after the operation completes. to send another packet, the start pointer must be manually moved to the location of the next packet and the transmit length must be updated. if desired, the application can retransmit the last packet by setting txrts again without modifying etxst or etxlen. 9.1.1 transmission status after transmitting a packet (either successfully or unsuccessfully), the etxstat and etxwire registers contain status information about the operation. the values in these registers will persist until the next packet is transmitted (again, either successfully or unsuccessfully). therefore, etxstat and etxwire should be treated as valid only when txrts is clear. the latecol (etxstat<10>), maxcol (etxstat<9>) and exdefer (etxstat<8>) bits are error flags indicating that packet transmission has failed. (these errors are possible only in half-duplex mode; therefore, these status bits should be ignored when operating in full-duplex mode.) the device asserts these flags and clears the txrts bit to prevent a single packet from stalling device operation. when any of these flags are set, the packet was not success- fully transmitted and the host controller should determine whether to retry or ignore the error. the crcbad (extstat<4>) bit is a warning. it is only meaningful when automatic crc generation is dis- abled and indicates that the checksum computed by the mac did not match the one appended by software. if the software crc is incorrect, the packet will be rejected by the remote node. when automatic mac hardware generation of the crc is enabled, this bit can be ignored as the crc is always correct. the defer bit (etxstat<7>) and the colcnt<3:0> bits (etxstat<3:0>) are status indicators. defer simply indicates that the device had to wait before transmitting due to flow control or other traffic on the network. the colcnt bits indicate the number of collisions that occurred before the packet was successfully transmitted. the etxwire register is a count of the number of actual bytes the mac transmitted onto the physical medium before the transmission completed, either successfully or unsuccessfully. in full-duplex mode, this count is the total length of the packet, including padding and crc. in half-duplex mode, this status register includes all extra bytes that were transmitted due to any collisions that occurred. therefore, it can be used to gauge how much total bandwidth the application is using. 9.1.2 special case transmission when the value of etxlen is 07h or less, the ability to set the txrts bit is locked out in hardware. this is because the resulting packet would be unable to meet ieee 802.3 requirements. if the phy is unlinked at the time software sets the txrts bit to transmit a packet, the transmission will complete normally with applicable interrupts still occur- ring. however, the phy submodule will also suppress the transmission of any data onto the physical medium. this avoids interference with auto-negotiation, which may be already using the physical medium. this behavior is also necessary to meet ieee 802.3 specifications. if an attempt is made to transmit a packet that is larger than specified in the mac maximum frame length reg- ister, and huge frames are disabled (macon2<2> = 0 ), the transmission will start normally. however, once the mac has transmitted the number of bytes defined in mamxfl, the mac will immediately cease transmis- sion. this results in the packet being partially transmitted and then truncated without a valid crc being appended. in almost all cases, this results in the remote node rejecting the packet as having an invalid crc. downloaded from: http:///
enc424j600/624j600 ds39935c-page 86 ? 2010 microchip technology inc. in full duplex, the mac inhibits transmission of any packets until the pause timer expires when two conditions are met: flow control is enabled (rxpaus bit is set) and a valid pause frame was received from the remote node it will still be possible for software to set the txrts bit to start a transmission. however, this has the effect of queuing the packet for future transmission instead of causing an immediate transmission to start. once the pause timer expires, the queued packet will transmit normally, causing any applicable interrupts to occur. 9.2 receiving packets as ethernet frames arrive, they are written to the circu- lar receive buffer, bounded by the receive buffer start address (erxst) register and the end of the physical memory at 5fffh. the hardware also maintains a counter indicating the number of pending frames. each frame starts on an even address. the hardware maintains a receive head pointer, erxhead, indicating the next location to be written, and automatically wraps back to erxst when it reaches the end of memory. the tail pointer, erxtail, is maintained by software. addresses from the tail pointer, up to the head pointer, are considered to be protected by software. this allows the host controller to prevent incoming frames from overwriting data that has not yet been processed. when erxtail points to the same location as erxhead, the receive packet buffer is considered to be full. due to this definition, there is no empty condi- tion. for simplicity, applications may choose to keep the tail pointer always set to two bytes behind the next frame to be processed, or two bytes behind the head pointer when no frames are pending. figure 9-3 shows these pointer relationships. if erxhead reaches erxtail while receiving a frame, or if the receive filters reject the packet, the erxhead pointer is rolled back to its previous location and the packet is discarded. figure 9-3: examples of receive buffe r wrap between erxhead and erxtail t xx 01 02 03 04 05 8a 8b 8c h ... initial state, buffer is empty: 05 06 07 08 0a h t xx 01 02 03 04 ... buffer has wrapped and contains pending data: t xx h ... h t xx ... buffer is empty: buffer contains pending data to be processed: 92 93 94 95 96 97 98 99 h t xx 01 02 8a 8b 8c 8d 8e 8f 90 91 ... buffer has wrapped and is currently full: h t xx 01 02 free byte for incoming data byte protected from incoming data head pointer (erxhead) tail pointer (erxtail), skip when reading dummy byte, skip when reading next packet pointer for pending frame erxst 5fffh downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 87 enc424j600/624j600 it is possible for the host application to write to the receive buffer. however, it is recommended not to do so outside of the area protected by the tail pointer in order to prevent it from being subsequently overwritten by future receive packets. erxhead is a read-only register and may be updated at any time by hardware. the high byte is shadowed to ensure it can be safely read on 8-bit interfaces (spi or psp). when reading erxhead, read the low byte first. this operation simultaneously copies the high byte to a shadow register. reading the high byte automatically reads from this shadow register. this ensures that the value has not been modified since the low byte was obtained, even if another packet has been received in the interim. 9.2.1 configuring packet reception once the mac and phy are properly initialized, the device is ready to begin receiving packets. to enable reception: 1. program the erxst pointer (low byte first if writing a byte at a time) to the first address to be used for the receive buffer. this pointer must indicate an even address. the head pointer, erxhead, will automatically be set to the same value. 2. in the host controller application, create a variable, nextpacketpointer , to hold the address value of the next received packet. initialize this variable to be equal to the current value of erxst. 3. program the tail pointer, erxtail, to the last even address of the buffer or 5ffeh. 4. configure interrupts as desired. see section 13.0 interrupts for more information. 5. set rxen (econ1<0>) to enable reception. once rxen is set, it is recommended that erxst not be modified. the host controller must monitor the encx24j600 to determine when a packet has arrived and is ready to be processed. this is accomplished by using the packet pending interrupt as described in section 13.1.5 received packet pending . alternatively, poll the pktcnt bits for a non-zero value. 9.2.2 storage of incoming packets packets are stored sequentially in the receive buffer. each frame is stored as it was presented to the mac, including all padding and frame check (crc) bytes, but excluding any preamble or start of stream/frame delim- iter bytes. frames are always saved starting on an even address, so those with an odd length skip one byte before the next frame begins. a sample packet stored in memory is shown in figure 9-4. when a packet is received, the hardware increments the packet counter bits, pktcnt (estat<7:0>). incoming bytes are written sequentially, beginning at the head pointer, erxhead. if the head pointer reaches the tail pointer, erxtail, during reception, or if incrementing the pktcnt bits would cause an over- flow, the packet will be discarded and the head pointer restored. each received frame is preceded in memory by a pointer to the next frame and a receive status vector (rsv). the rsv includes the length of the frame, and flags indicating the type of packet and which filters were matched. this format of the rsv is shown in table 9-1. to retrieve a packet from the buffer: 1. verify that a packet is waiting by ensuring that the pktcnt<7:0> bits are non-zero or that pktif (eir<6>) is set. 2. begin reading at address pointed to by the application variable, nextpacketpointer (see section 9.2.1 configuring packet reception ). 3. read the first two bytes of the packet, which are the address of the next packet and write to nextpacketpointer . 4. read the next six bytes, which are the receive status vector (rsv). 5. read the ethernet frame. the number of bytes to be read is indicated by the received byte count in the rsv read during step 4. 6. as the frame is read and processed, incremental amounts of memory buffer can be freed up by updating the erxtail pointer value to the point where the packet has been processed, taking care to wrap back at the end of the received memory buffer. once the whole frame has been processed, the final value of erxtail should be equal to ( nextpacketpointer C 2). 7. set pktdec (econ1<8>) to decrement the pktcnt bits. pktdec is automatically cleared by hardware if pktcnt decrements to zero. downloaded from: http:///
enc424j600/624j600 ds39935c-page 88 ? 2010 microchip technology inc. figure 9-4: example of a rece ived packet in buffer memory : : : : fcs[2] fcs[3] fcs[0] fcs[1] 01h 68h rsv[1] rsv[0] 04h 00h 00h a3h 02h 01h 34h 12h 78h 56h bch 9ah 00h 80h data[1] data[0] pad pad pad pad xx xx rsv[3] rsv[2] rsv[5] rsv[4] : : : : pad data[40] fcs[2] fcs[3] fcs[0] fcs[1] rsv[1] rsv[0] rsv[3] rsv[2] memory high low byte address byte address :: 011dh 011fh 0121h0123h 0125h 0127h 0129h 012bh 012dh 012fh 0131h0133h 0135h 0137h :: 015fh 0161h0163h 0165h 0167h 0169h 016bh 016dh 016fh : : rsv[5] rsv[4] :: 011eh 0120h 0122h 0124h 0126h 0128h 012ah 012ch 012eh 0130h 0132h 0134h 0136h 015eh :: 0160h0162h 0164h 0166h 0168h 016ah 016ch 016eh : : previous packet current packet next packet erxtail pointer to next packet receive status vector destination address source address : : : : 011ch start of next packet downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 89 enc424j600/624j600 table 9-1: receive status vector byte bit(s) field description 5 47:40 zeros 00h 43 9z e r o 0 38 reserved 37 reserved 36 unicast filter match current frame met criteria for the unicast receive filter. 35 pattern match filter match current frame met criteria for the pattern match receive filter as configured when the packet was received. 34 magic packet? filter match current frame met criteria for the magic pack et receive filter as configured when the packet was received. 33 hash filter match current frame met criteria for the hash receive filter as configured when the packet was received. 32 not-me filter match current frame met criteria for the not-me receive filter. 3 31 runt filter match current frame met criteria for the runt packet receive filter. 30 receive vlan type detected current frame was recognized as a vlan tagged fram e. 29 receive unknown opcode current frame was recognized as a control frame but it contained an unknown opcode. 28 receive pause control frame current frame was recognized as a control frame containing a valid pause frame opcode and a valid destination address. 27 receive control frame current frame was recognized as a control frame for having a valid type/length designating it as a control frame. 26 dribble nibble indicates that after the end of this packet, an additional 1 to 7 bits were received. the extra bits were thrown away. 25 receive broadcast packet current frame has a valid broadcast address. 24 receive multicast packet current frame has a valid multicast address. 2 23 received ok received packet had a valid crc and no symbol errors. 22 length out of range frame type/length field was larger than 1500 bytes (type field). 21 length check error frame length field value in the packet does not match the actual data byte length and specifies a valid length. 20 crc error frame crc field value does not match the crc calculated by the mac. 19 reserved 18 carrier event previously seen a carrier event was detected at some time since the last receive. the carrier event is not associated with this packet. a carrier event is activity on the receive channel that does not result in a packet receive attempt being made. 17 reserved 16 packet previously ignored a frame larger than 50,000 bit times occurred or a packet has been dropped since the last receive. 1 15:0 received byte count length of the received frame in bytes. this includes the destination address, source address, type/length, data, padding and crc fields. this field is stored in little-endian format. 0 downloaded from: http:///
enc424j600/624j600 ds39935c-page 90 ? 2010 microchip technology inc. register 9-1: econ1: ethe rnet control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 modexst hashen hashop hashlst aesst aesop1 aesop0 pktdec bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fcop1 fcop0 dmast dmacpy dmacssd dmanocs txrts rxen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 modexst: modular exponentiation start bit 1 = modular exponentiation calculation started/busy; automatically cleared by hardware when done 0 = modular exponentiation calculation done/idle bit 14 hashen: md5/sha-1 hash enable bit 1 = md5/sha-1 hashing engine enabled. data written to the hashing engine by the dma is added to the hash. 0 = md5/sha-1 hashing engine disabled bit 13 hashop: md5/sha-1 hash operation control bit 1 = md5/sha-1 hash engine loads the initial value (iv) from the hash memory. this mode is typically used for hmac hash operations. 0 = normal md5/sha-1 hash operation bit 12 hashlst: md5/sha-1 hash last block control bit 1 = the next dma transfer to the hash engine completes the hash. if needed, padding is automatically generated and added to the hash. 0 = the next dma transfer to the hash engine adds data to the hash. further data additions to the hash are still possible. bit 11 aesst: aes encrypt/decrypt start bit 1 = aes encrypt/decrypt operation is started/busy; automatically cleared by hardware when done 0 = aes encrypt/decrypt operation is done/idle bit 10-9 aesop<1:0>: aes operation control bits 11 = reserved 10 = ecb/cbc decrypt 01 = cbc/cfb encrypt 00 = ecb/cfb/ofb encrypt or key initialization bit 8 pktdec: rx packet counter decrement control bit 1 = decrement pktcnt (estat<7:0>) bits by one. hardware immediately clears pktdec to 0 , allowing back-to-back decrement operations. 0 = leave pktcnt bits unchanged bit 7-6 fcop<1:0>: flow control operation control/status bits when fuldpx (macon2<0>) = 1 : 11 = end flow control by sending a pause frame with 0000h pause timer value; automa tically cleared by hardware when done 10 = enable flow control by periodically sending pause frames with a pause timer d efined by epaus 01 = transmit single pause frame defined by epaus; automatically cleared by hardware when done 00 = flow control disabled/idle when fuldpx (macon2<0>) = 0 : 1x , 01 = enable flow control by continuously asserting backpressure (transmitting preamble) 00 = flow control disabled/idle downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 91 enc424j600/624j600 bit 5 dmast: dma start bit 1 = dma is started/busy; automatically cleared by hardware when done 0 = dma is done/idle bit 4 dmacpy: dma copy control bit 1 = dma copies data to memory location at edmadst 0 = dma does not copy data; edmadst is ignored bit 3 dmacssd: dma checksum seed control bit 1 = dma checksum operations are initially seeded by the ones complement of the checksum contained in edmacs 0 = dma checksum operations are initially seeded by 0000h bit 2 dmanocs: dma no checksum control bit 1 = dma does not compute checksums; edmacs remains unchanged 0 = dma computes checksums; hardware updates edmacs at the completion of all dma operations bit 1 txrts: transmit request to send status/control bit 1 = transmit an ethernet frame; automatically cleared by hardware when done 0 = transmit logic done/idle bit 0 rxen: receive enable bit 1 = packets which pass the current rx filter configuration are written to the receive buffer 0 = all packets received are ignored register 9-1: econ1: ethernet control register 1 (continued) downloaded from: http:///
enc424j600/624j600 ds39935c-page 92 ? 2010 microchip technology inc. register 9-2: etxstat: ethernet transmit status register u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 r rl a t e c o l (1) maxcol (1) exdefer (1) bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 defer (1) r r crcbad colcnt3 (1) colcnt2 (1) colcnt1 (1) colcnt0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-11 reserved: ignore on read bit 10 latecol: transmit late collision status bit (1) 1 = a collision occurred after transmitting more than maclconh + 8 bytes. the last transmission was aborted. 0 = no late collision occurred during the last transmission bit 9 maxcol: transmit maximum collisions status bit (1) 1 = maclconl + 1 collisions occurred while transmitting the last packet. the last transmission was aborted. 0 = maclconl or less collisions occurred while transmitting the last packet bit 8 exdefer: transmit excessive defer status bit (1) 1 = the medium was busy with traffic from other nodes for more than 24,288 bit times. the last transmission was aborted. 0 = the mac deferred for less than 24,288 bit times while transmitting the last packet bit 7 defer: transmit defer status bit (1) 1 = the medium was busy with traffic from other nodes, so the mac was forced to temporarily defer transmission of the last packet 0 = no transmit deferral or an excessive deferral occurred while attempting to transmit the last packet bit 6-5 reserved: ignore on read bit 4 crcbad: transmit crc incorrect status bit 1 = the fcs field of the last packet transmitted did not match the crc internally ge nerated by the mac during transmission 0 = the fcs field of the last packet transmitted was correct or the mac is configured to append an internally generated crc bit 3-0 colcnt<3:0>: transmit collision count status bits (1) number of collisions that occurred while transmitting the last packet. note 1: applicable in half-duplex mode only; collisions and deferrals are not possible in full-duplex mode. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 93 enc424j600/624j600 register 9-3: estat: ethernet status register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 int fcidle rxbusy clkrdy r phydpx rp h y l n k bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 pktcnt7 pktcnt6 pktcnt5 pktcnt4 pktcnt3 pktcnt2 pktcnt1 pktcnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 int: interrupt pending status bit 1 = one of the eir bits is set and enabled by the eie register. if intie (eie<15>) is set, the int pin is also driven low. 0 = no enabled interrupts are currently pending. the int pin is being driven high. bit 14 fcidle: flow control idle status bit 1 = internal flow control state machine is idle. it is safe to change the fcop (econ1<7:6>) and fuldpx (macon2<0>) bits. 0 = internal flow control state machine is busy. do not modify the fcop (econ1<7:6>) or fuldpx (macon2<0>) bits. bit 13 rxbusy: receive logic active status bit 1 = receive logic is currently receiving a packet. this packet may be discarded in the future if an r x buffer overflow occurs or a receive filter rejects it, so this bit does not necessarily indicate that an rx packet pending interrupt will occur. 0 = receive logic is idle bit 12 clkrdy: clock ready status bit 1 = normal operation 0 = internal ethernet clocks are not running and stable yet. only the estat and eudast registers should be accessed. bit 11 reserved: ignore on read bit 10 phydpx: phy full duplex status bit 1 = phy is operating in full-duplex mode 0 = phy is operating in half-duplex mode bit 9 reserved: ignore on read bit 8 phylnk: phy linked status bit 1 = ethernet link has been established with a remote ethernet partner 0 = no ethernet link present bit 7-0 pktcnt<7:0>: receive packet count bits number of complete packets that are saved in the rx buffer and ready for software processing. set th e pktdec (econ1<8>) bit to decrement this field. downloaded from: http:///
enc424j600/624j600 ds39935c-page 94 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 95 enc424j600/624j600 10.0 receive filters to minimize the number of frames that the host controller must process, enc424j600/624j600 devices incorpo- rate 11 different receive filters to discard unwanted frames. the following filters are available: crc error collection filter runt error collection filter crc error rejection filter runt error rejection filter unicast collection filter not-me unicast collection filter multicast collection filter broadcast collection filter hash table collection filter magic packet? collection filter pattern match collection filter each filter is software configurable, and can be individu- ally enabled or disabled, using the erxfcon register (register 10-1). each filter is either a collection or a rejection filter, with incoming frames passing sequen- tially through each enabled filter. the first filter to make a definitive decision for a frame takes priority over all others. collection filters either force a frame to be accepted or defer the decision to a lower priority filter. similarly, rejection filters either discard frames or defer to lower priority filters. frames that pass through all filters without specifically being accepted are discarded. figure 10-1 demonstrates this decision tree. at power-up, the crc error rejection, runt error rejection, unicast collection and broadcast collection filters are enabled, and all others are disabled. with these settings, the device will only accept broadcast frames and frames specifically addressed to the local mac address. invalid frames and those destined for other nodes will be automatically rejected. note 1: the mac internally processes and filters ethernet control frames as they arrive and before they reach these filters. for the application to receive ethernet control frames, enable the passall option (maccon1<1> = 1 ). 2: if the ethernet receive enable bit, rxen (econ1<0>), is set, the filters may make an incorrect decision if any of the receive filters are reconfigured at the exact moment a new frame is being received. to avoid this behavior, clear the rxen bit prior to changing any receive filter settings. downloaded from: http:///
enc424j600/624j600 ds39935c-page 96 ? 2010 microchip technology inc. register 10-1: erxfcon: etherne t rx filter control register r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 hten mpen notpm pmen3 pmen2 pmen1 pmen0 bit 15 bit 8 r/w-0 r/w-1 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-1 crceen crcen runteen runten ucen notmeen mcen bcen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 hten: hash table collection filter enable bit 1 = accept packets having a hashed destination address that points to a set bit in the hash table (1) 0 = filter is disabled bit 14 mpen: magic packet? collection filter enable bit 1 = accept packets containing a magic packet pattern for the local mac address (1) 0 = filter is disabled bit 13 unimplemented: read as 0 bit 12 notpm: pattern match inversion control bit 1 = pattern match checksum mismatch required for a successful pattern match 0 = pattern match checksum match required for a successful pattern match bit 11-8 pmen<3:0>: pattern match collection filter enable bits when notpm = 0 : a packet is accepted by the filter if the pattern checksum matches and the selected modes condition is true. when notpm = 1 : a packet is accepted by the filter if pattern checksum does not match and the selected modes condition is true.1111 .... = reserved 10101001 = magic packet for local unicast address (1) 1000 = hashed packet destination points to a bit in the hash table registers that is set (1) 0111 = packet destination is not the broadcast address (1) 0110 = packet destination is the broadcast address (1) 0101 = packet destination is not a multicast address (1) 0100 = packet destination is a multicast address (1) 0011 = packet destination is not the local unicast address (1) 0010 = packet destination is the local unicast address (1) 0001 = accept all packets with a checksum match defined by notpm (1) 0000 = filter is disabled bit 7 crceen: crc error collection filter enable bit 1 = packets with an invalid crc will be accepted, regardless of all other filter settings 0 = filter is disabled note 1: this filtering decision can be overridden by the crc error rejection filter and runt error rejection filter decisions, if enabled, by crcen or runten. 2: this filtering decision can be overridden by the crc error collection filter an d runt error collection filter decisions, if enabled, by crceen or runteen. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 97 enc424j600/624j600 bit 6 crcen: crc error rejection filter enable bit 1 = packets with an invalid crc will be discarded (2) 0 = filter is disabled bit 5 runteen: runt error collection filter enable bit 1 = accept packets that are 63 bytes or smaller, regardless of all other filter settings 0 = filter is disabled bit 4 runten: runt error rejection filter enable bit 1 = discard packets that are 63 bytes or smaller (2) 0 = filter is disabled bit 3 ucen: unicast destination collection filter enable bit 1 = accept packets with a destination address matching the local mac address (1) 0 = filter is disabled bit 2 notmeen: not-me unicast destination collection filter enable bit 1 = accept packets with a unicast destination address that does not match the local mac address (1) 0 = filter is disabled bit 1 mcen: multicast destination collection filter enable bit 1 = accept packets with a multicast destination address (1) 0 = filter is disabled bit 0 bcen: broadcast destination collection filter enable bit 1 = accept packets with a broadcast destination address of ff-ff-ff-ff-ff-ff (1) 0 = filter is disabled register 10-1: erxfcon: ethernet rx filter control register (continued) note 1: this filtering decision can be overridden by the crc error rejection filter and runt error rejection filter decisions, if enabled, by crcen or runten. 2: this filtering decision can be overridden by the crc error collection filter an d runt error collection filter decisions, if enabled, by crceen or runteen. downloaded from: http:///
enc424j600/624j600 ds39935c-page 98 ? 2010 microchip technology inc. figure 10-1: receive filter decision tree packet arrives discard packet accept packet hten set? crc is valid? mpen set? pattern match? (1) crceen set? crcen set? runteen set? runten set? ucen set? bcen set? mcen set? notmeen set? yes nono no no no no no no no no reject or disabled length < 64 bytes? crc is valid? length < 64 bytes? unicast for me? unicast for someone else? multicast destination? broadcast destination? hash table bit set? magic packet? for me? yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes nono no no no no no no yes yes no no accept yes yes note 1: for details on the pattern match filter, refer to section 10.11 pattern match collection filter . downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 99 enc424j600/624j600 10.1 crc error collection filter the crc error collection filter allows applications to accept frames with an invalid frame check sequence (fcs). this filter is primarily intended for performing network, cable and layout noise immunity diagnostics. the filter computes the crc over incoming frame data and compares the result with the fcs appended at the end of each frame. if the computed crc does not match the fcs, the filter will accept the frame. if the crc is correct or the crc error collection filter is disabled, the frame passes through to the next lower priority filter. this filter is disabled at power-up. to enable the filter, set crceen (erxfcon<7>). enabling this filter will cause frames with bit transmission errors and/or invalid data to be accepted into the packet buffer. to comply with ieee 802.3 specifications, this filter should be disabled. 10.2 runt error collection filter the runt error collection filter allows applications to accept frames shorter than 64 bytes (counting from the start of the ethernet source address to the end of the frame check sequence, inclusive). runt packets are ordinarily generated by early half-duplex collisions and should not be treated as valid packets. this filter is primarily intended for detecting duplex mismatches or performing network utilization diagnostics. the filter checks the length of each frame and accepts any frame with a length of 63 or fewer bytes. frames that are 64 bytes or longer are passed on to the next lower priority filter. this filter is disabled at power-up. to enable the filter, set runteen (erxfcon<5>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of length. to comply with ieee 802.3 specifications and properly discard collision fragments, this filter should be disabled. 10.3 crc error rejection filter the crc error rejection filter verifies the frame check sequence of incoming frames. if the crc is invalid, the frame is discarded. frames with a valid crc will be passed on to the next filter. the mac truncates received frames if they exceed the length specified by the mac maximum frame length register, mamxfl. because the frame check sequence is always transmitted as the last four bytes of any ethernet frame, reception of an oversize frame that becomes truncated will almost always result in an invalid crc. when enabled, the crc error rejection filter will discard these truncated frames, as well as collision fragments, and other frames that become corrupted during transmission. this filter is enabled at power-up. to disable this filter, clear crcen (erxfcon<6>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of crc validity. 10.4 runt error rejection filter the runt error rejection filter checks the length of each incoming frame. if the length of the frame is less than the ethernet minimum of 64 bytes, the frame will be discarded. frames of 64 bytes or larger will be passed on to the next filter. this filter is enabled at power-up. to disable this filter, clear runten (erxfcon<4>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of length. 10.5 unicast collection filter the unicast collection filter checks the destination address of each incoming frame. if the destination address exactly matches the local mac address, defined by the maadr registers, the frame will be accepted. if there is a mismatch, the frame will be passed on to the next filter. this filter is enabled at power-up. to disable this filter, clear ucen (erxfcon<3>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of destination address. 10.6 not-me unicast collection filter the not-me unicast collection filter checks the desti- nation address of incoming frames. if the destination address is a unicast address, but does not exactly match the contents of the maadr registers, the frame will be accepted. this will include any frame specifically addressed to another station, but will not include multi- cast or broadcast frames. if the packet is a multicast, broadcast or unicast frame for the local device, the frame will be passed on to the next filter. this filter is disabled at power-up. to enable this filter, set notmeen (erxfcon<2>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of destination address. note: enable this filter for normal ieee 802.3 compliant operation. note: enable this filter for normal ieee 802.3 compliant operation. downloaded from: http:///
enc424j600/624j600 ds39935c-page 100 ? 2010 microchip technology inc. 10.7 multicast collection filter the multicast collection filter checks the destination address of incoming frames. if the least significant bit (lsb) of the first byte of the destination address is set, the frame will be accepted. this represents all multicast frames. if the frame has a unicast destination, it will be passed on to the next filter. this filter is disabled at power-up. to enable this filter, set mcen (erxfcon<1>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of destination address. 10.8 broadcast collection filter the broadcast collection filter checks the destination address of incoming frames. if the destination address is ff-ff-ff-ff-ff-ff, the frame will be accepted. frames matching this filter are designated as being broadcast to all nodes that receive them. all frames with other address values will be passed on to the next filter. this filter is enabled at power-up. to disable this filter, clear bcen (erxfcon<0>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of destination address. 10.9 hash table collection filter the hash table filter accepts frames based on their des- tination address, and is configurable for up to 64 different hash values. this filter allows the device to accept frames for multiple destination addresses (without accepting all not-me traffic as described in section 10.6 not-me unicast collection filter ). it can also be used to accept traffic for one or more specific multicast groups (without accepting all multi- cast traffic as described in section 10.7 multicast collection filter ). note that hash table collisions are possible, so applications should still verify the mac address of accepted frames. this filter simply reduces the amount of incoming traffic for these applications. the filter performs a 32-bit crc over the six destina- tion address bytes in the packet, using the polynomial, 4c11db7h. from the resulting 32-bit binary number, a 6-bit value is taken from bits<28:23>. this value, in turn, points to a location in a table formed by the ether- net hash table registers, eth1 through eth4. if the bit in that location is set, the packet meets the hash table filter criteria and is accepted. the specific pointer values for each bit location in the table are shown in table 10-1. an example of the hash table operation is shown in example 10-1. in this case, the destination address, 01-00-00-00-01-2c, produces a hash table pointer value of 34h, which points to bit 4 of eth4. if this bit is 1 , the packet will be accepted. if this hash table bit is 0 , the packet will be passed to the next lower priority filter. by extension, if every bit in the hash table is set, the filter criteria will always be met, so all packets will be accepted if no higher priority filter has rejected the packet. similarly, clearing every bit in the hash table registers means that the filter criteria will never be met, so all packets will be passed on to the next lower priority filter. this filter is disabled at power-up. to enable this filter, set hten (erxfcon<15>). if the filter is disabled, all frames will be passed on to the next lower priority filter, regardless of destination address or hash table register values. example 10-1: deriving a hash table location table 10-1: bit assignments in hash table registers packet destination address: 01-00-00-00-01-2c (hex) result of crc-32 with 4c11db7h: 110 1 1010 0 000 1011 0100 0101 0111 0101 (binary) pointer derived from bits<28:23> of crc result: 110100 (binary) or 34 (hex) corresponding hash table location: eht4<4> register bit numbers in hash table 1 51 41 31 21 11 09876543210 eht1 0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00 eht2 1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10 eht3 2f 2e 2d 2c 2b 2a 29 28 27 26 25 24 23 22 21 20 eht4 3f 3e 3d 3c 3b 3a 39 38 37 36 35 34 33 32 31 30 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 101 enc424j600/624j600 10.10 magic packet? collection filter the magic packet filter scans all packet contents for a magic packet pattern for the local mac address. if a valid magic packet pattern is found, then the frame will be accepted. the magic packet pattern consists of a sync pattern of six ffh bytes, followed by the mac address of the station the magic packet is intended for, repeated 16 times. see figure 10-2 for a sample magic packet. this pattern may be located anywhere within the packet. other fields in the packet, such as the destination address or bytes preceding or following the magic packet pattern, are ignored. this filter is disabled at power-up. to enable this filter, set mpen (erxfcon<14>). if the filter is disabled or the received packet is not a magic packet, the frame will be passed to the next lower priority filter. figure 10-2: sample magic packet? format source address fcs destination address type/length ff ff ff ff ff ff 08 00 09 0a 0b 0c 0d 0e received data field 00 01 1a 00 ca fe ef 54 32 10 ff ff ff ff ff 00 ff ff ff ff ff ff 00 04 a3 11 23 33 19 1a 1b 1c 1d 1e data sync pattern sixteen repeats of the maadr mac address comments 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 00 04 a3 11 23 33 downloaded from: http:///
enc424j600/624j600 ds39935c-page 102 ? 2010 microchip technology inc. 10.11 pattern match collection filter the pattern match filter accepts frames that match or do not match a specific pattern. this filter is useful for accepting frames that contain expected data sequences. pattern matching is accomplished by choosing a 64-byte window within the first 128 bytes of a frame, then selecting some or all of those bytes for a checksum calculation. the checksum algorithm is the same as the tcp/ip checksum calculation described in section 14.2 checksum calculations . this checksum is then com- pared to the epmcs register and the result is optionally negated by the notpm (erxfcon<12>) flag. the pattern match filters control bits, pmen<3:0> (erxfcon<11:8>), differ from all other filters in that there are multiple options. the output of the above match can be anded with several other conditions. this adds significant flexibility to the filter as it can require both a pattern match (or non-match) and other criteria (such as a broadcast frame or hash table match). to use the pattern match filter, the host controller must first program the pattern match offset (epmo) to select the 64-byte window to be used. setting this register to 0000h selects the first 64 bytes of the frame, beginning with the first byte of the destination address. setting 0006h selects byte numbers, 6 through 69, beginning with the first byte of the source address. this window must fall within the first 128 bytes of a frame; the offset value of 1 is not supported, thus, the valid values for epmo are 0, 2-63. note that if the frame length is short enough so that the entire window would not exist in the frame, the filter will automatically fail to match. this is true even if the corresponding mask bits are all 0 . then, the host must select the pattern match mask bytes by using the epmm registers. within this 64-byte window, each byte can be selectively included or excluded from the checksum computation by setting or clearing the respective bit in the pattern match mask. a bit set to 1 indicates that the byte is to be included. data bytes with corresponding mask bits set to 0 are completely removed for the purpose of the checksum calculation (as opposed to treating the data bytes as zero). next, write the expected checksum to the epmcs reg- ister. to select frames that match the checksum, clear notpm (erxfcon<12>). to select only frames that fail to match the checksum, set notpm to 1 . finally, set the pmen bits to 0001b to require only the pattern match criteria, or one of the other values to add additional conditions. for example, to filter all frames having a particular source mac address of 00-04-a3-ff-ff-ff: 1. program the pattern match offset to 0000h. 2. set bits, 6-11, of epmm1 (assuming all other mask bits are 0 ). 3. program the epmcs register with a checksum value of 5bfch. 4. clear notpm to require an exact match. note that the offset is not programmed to 0006h and the epmm1<5:0> bits are not set; the checksum would still be 5bfch. however, in this second case, frames less than 70 bytes would never meet the pattern match criteria because there would not be a complete 64-byte window beginning at offset position, 0006h. another example of a pattern match filter is illustrated in figure 10-3. the pattern match collection filter is disabled at power-up. because this filter has the lowest priority of all receive filters, if this filter is disabled or the packet does not meet the configured pattern match criteria, the packet is automatically discarded. 10.12 promiscuous mode to accept all incoming frames regardless of content (promiscuous mode), set the crcen, runten, ucen, notmeen and mcen bits. disable all other filters. to accept absolutely all recognizable ethernet frames, including those with errors, set passall (maccon1<1>) to 1 and set ucen, notmeen and mcen in erxfcon. in any mode, frames which cannot fit in the receive buffer, or would cause the pktcnt field (estat<7:0>) to overflow, are still discarded. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 103 enc424j600/624j600 figure 10-3: sample pattern match format sa epmo = 0006h fcs da type/length data bytes used for checksum computation epmm4:epmm1 = 0000000000001f0ah 11 22 33 44 55 66 77 88 99 aa bb cc 00 5a 09 0a 0b 0c 0d . . . 40 . . . fe 45 23 01 received data field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 . . . 69 . . . byte # 64-byte window used for pattern match input configuration: values used for checksum computation = {88h, aah, 09h, 0ah, 0bh, 0ch, 0dh, 00h} epmcs = 563fh note: received data is shown in hexadecimal. byte numbers are shown in decimal format. (00h padding byte added by hardware) downloaded from: http:///
enc424j600/624j600 ds39935c-page 104 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 105 enc424j600/624j600 11.0 flow control flow control provides a mechanism for network stations to temporarily stop transmission of data to themselves. this feature is commonly used to prevent buffer overruns while receiving data. enc424j600/624j600 devices are capable of both automatic and manual flow control. the hardware can advertise when it is temporarily unable to receive data and delay transmissions when a remote system does the same. flow control is supported for both full and half-duplex links. it can either be initiated manually by software, or configured to enable automatically when insufficient space remains in the receive buffer memory. flow control operation is configured by the fcop<1:0> bits (econ1<7:6>), the autofc bit (econ2<7>), the rxpaus and passall bits (macon1<2:1>), and the epaus and erxwm registers in some modes. 11.1 modes of operation flow control operation differs between full and half-duplex links. both modes are supported, but it is important to understand the difference before enabling flow control in an application. 11.1.1 half-duplex mode when the link is operating in half-duplex mode, flow control operates by jamming the network. the node wishing to inhibit transmissions to itself sends a preamble pattern of alternating ones and zeros (55h) on the medium; this is also known as asserting back pressure on the link. since the link is operating under half-duplex mode, all connected nodes must wait before transmitting. if a node does transmit, compliant nodes will detect the collision and wait until the jamming stops to retransmit. this effectively jams the network until flow control is disabled. if a frame is to be transmitted while flow control is enabled, the encx24j600 will stop jamming, wait the standard inter-packet gap (ipg) delay, then attempt to transmit. because all traffic was previously jammed, several nodes may begin transmitting and several collisions may occur. the hardware will transmit and resume jamming as soon as possible, but it is feasible for other nodes to transmit packets before this happens. this limitation of flow control in half-duplex operation cannot be avoided. given the detrimental effect that back pressure based flow control inflicts on a network, along with the possible lack of effectiveness, it is recommended that flow control be avoided in half-duplex mode unless the application is used in a closed network environment with proper testing. when operating in half-duplex mode, setting fcop<1:0> to 00 disables the flow control. any other combination enables flow control and causes the device to jam the network. 11.1.2 full-duplex mode flow control for full-duplex links is much more robust. instead of jamming the network, a station can send a pause control frame to the remote system. the pause frame is directed to a special multicast destination address (01-08-c2-00-00-01) and indicates how long the remote node should wait before transmitting again. this time is expressed in units of pause quanta, where one pause quanta is equal to 512 bit times. while a station is silenced or paused, reception is still enabled. if another pause control frame arrives, any previous value is discarded and the timer restarts using the new pause time value. if the received control frame has a timer value of zero, the pause is terminated and transmission resumes immediately. when operating in full-duplex mode, each combina- tion of fcop<1:0> has a different effect on transmitting control frames. these combinations are discussed in section 11.2.1 manual flow control . 11.1.3 transmitting and receiving pause control frames the encx24j600 automatically processes incoming pause control frames without application intervention. when a pause control frame is received, the mac internally sets the pause timer. transmission is inhib- ited while the timer is active. if an application attempts to transmit a packet during this time, the transmission logic will stall until the time expires (i.e., txrts will stay set for longer than normal). pause control frames are nor mally filtered out by the mac and are not written to the receive buffer. setting the passall bit (macon1<1>) alters this behavior and causes these frames to pass through the receive filters. if the frame is accepted, it will be written to the receive buffer. however, setting passall will also cause the mac to not process the pause control frame. the trans- mission logic will allow immediate transmission without regard to the remote pause requests. before using either automatic or manual flow control, set the pause time value with the epaus register. this value controls the pause time value that is transmitted with each pause control frame. each unit of pause quanta in this register is equal to 512 bit times. note: flow control is an optional portion of the ieee 802.3 specification and may not be implemented on all remote devices. downloaded from: http:///
enc424j600/624j600 ds39935c-page 106 ? 2010 microchip technology inc. 11.2 manual and automatic flow control 11.2.1 manual flow control manual flow control is enabled by default on device power-up and whenever the autofc bit (econ2<7>) is cleared. setting autofc disables manual flow control. to begin manual flow control in full-duplex mode, set fcop<1:0> to one of the following combinations: idle ( 00 ): flow control is disabled or idle. single pause ( 01 ): transmit one pause frame for the time indicated in epaus; automatically returns to the idle state ( 00 ). continuous pause ( 10 ): periodically transmit pause frames using the value indicated in epaus for an indefinite time; must be terminated using end ( 11 ). end ( 11 ): transmit one pause frame with a timer of 0000h, then return to the idle state ( 00 ). in half-duplex mode, set fcop<1:0> to 10 to begin flow control and to 00 to terminate flow control. 11.2.2 automatic flow control when the autofc bit is set, the encx24j600 auto- matically initiates flow control operation when the amount of data in the receive buffer crosses an upper threshold value. flow control automatically terminates once the amount of pending data shrinks below a lower threshold. these thresholds, or watermarks, are determined by the upper and lower bytes (respectively) of the receive watermark register, erxwm. these thresholds represent 96-byte blocks. for example, setting the rxfwm bits to 20h and the rxewm bits to 10h initiates flow control when more than 3072 bytes of data are present in the buffer. flow control terminates when fewer than 1536 bytes of data are in the buffer. in automatic mode, the value of fcop<1:0> is controlled by the device and must not be changed by software. these bits, however, can be used as status bits to determine what state the automatic flow control engine is in. a value of 10 indicates flow control is active, while 00 indicates that flow control is idle. to use automatic flow control: 1. set the epaus register to indicate how many pause quanta should be specified in each control frame. it is recommended that the default value be used. 2. set rxfwm<7:0> (erxwm<15:8>) to indicate when flow control is to begin. when this number of 96-byte blocks is consumed in the receive buffer, the device considers its receive buffer to be full and initiates flow control. use the default value of 16 if the full threshold is to be set at 1536 bytes. 3. set rxewm<7:0> (erxwm<7:0>) to indicate when flow control is to end. when the number of occupied 96-byte blocks falls below this level, the device considers its receive buffer to be empty enough to receive more data. use the default value of 15 if the empty threshold is to be set at 1440 bytes. 4. set autofc (econ2<7>) to give control of the fcop<1:0> bits to the automatic flow control hardware. note: when flow control is used in conjunction with auto-negotiation, also set the adpaus bits (phana<11:10>) to 01 during initial- ization. see section 12.0 speed/duplex configuration and auto-negotiation for more information. note: setting rxfwm to be equal to rxewm (i.e., no hysteresis between full and empty) is not permitted. for automatic flow control to operate correctly, rxewm must always be at least one less than rxfwm, implying at least 96 bytes of hysteresis. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 107 enc424j600/624j600 register 11-1: macon1: mac control register 1 r/w-x r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r r bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-1 loopbk r rxpaus passall r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 reserved: write as 0 bit 13-12 unimplemented: read as 0 bit 11-8 reserved: write as 0 bit 7-5 unimplemented: read as 0 bit 4 loopbk: mac loopback enable bit 1 = transmitted packets are looped back inside the mac before reaching the phy 0 = normal operation bit 3 reserved: write as 1 bit 2 rxpaus: pause control frame reception enable bit 1 = inhibit transmissions when pause control frames are received (normal operation) 0 = ignore pause control frames which are received bit 1 passall: pass all received frames enable bit 1 = control frames received by the mac are written into the receive buffer if not filtered out 0 = control frames are discarded after being processed by the mac (normal operation) bit 0 reserved: write as 1 downloaded from: http:///
enc424j600/624j600 ds39935c-page 108 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 109 enc424j600/624j600 12.0 speed/duplex configuration and auto-negotiation enc424j600/624j600 devices are capable of operation at 10base-t and 100base-tx speeds in half-duplex and full-duplex modes for each. the speed and duplex mode can be selected manually, or the part can be configured to automatically select the optimum link parameters based on the capabilities of the link partner. when operating in 10base-t mode, the part also compensates for incorrect polarity on the tpin+/- pins (100base-tx signalling is non-polarized). in half-duplex operation, only one ethernet controller may transmit on the physical medium at any given time. if the host controller initiates a transmission while another device is transmitting, the encx24j600 will delay until the remote transmitter finishes its packet. other devices on the medium should do the same while the encx24j600 is transmitting. if two controllers begin transmitting at about the same time, a collision will occur. in this case, the data on the medium is corrupt; the encx24j600 aborts transmission and attempts to retransmit later. in full-duplex operation, both nodes may transmit simultaneously, so collisions do not occur. for details about transmitting packets, including collision detection and correction, refer to section 9.1 transmitting packets . speed and duplex modes are configured in the phcon1 register (register 12-1). the phstat1, phstat2 and phstat3 registers (registers 12-2 through 12-4) provide additional information about the status of the link. the phana, phanlpa and phane registers (registers 12-5 through 12-7) contain information about auto-negotiation status and configuration. 12.1 manual configuration speed and duplex modes can be manually selected by disabling auto-negotiation. manual configuration is enabled by clearing the anen bit (phcon1<12>). when manual configuration is used, both the speed and duplex mode must be selected. set the spd100 bit (phcon1<13>) to select 100base-tx operation or clear spd100 to select 10base-t mode. set the pfuldpx bit (phcon1<8>) to configure full-duplex mode or clear pfuldpx to use half-duplex operation. after reconfiguring the speed and duplex modes, update the macon2, maclcon, maipg and mabbipg registers as described in section 8.9 after link establishment . 12.2 auto-negotiation auto-negotiation allows ethernet devices to agree upon the fastest supported transmission rate. when an ethernet link is broken, a series of fast link pulses (flps) are transmitted periodically to initiate a link. among other things, these pulses encode information about the nodes speed and duplex capabilities. if a remote partner exists and supports auto-negotiation, it will reply with a burst of flps to advertise its own link capabilities. if both devices support 100base-tx full duplex, the link will be established and that mode will be used. otherwise, the link falls back to 100base-tx half duplex, 10base-t full duplex or 10base-t half duplex, in that order. if the remote link partner does not support auto- negotiation, the device will use an algorithm known as parallel detection to determine if the link partner is a 10base-t device or 100base-tx device. parallel detection will optimally resolve the operating speed, however, it will not have any means of learning the duplex state of the remote node. therefore, the encx24j600 phy will always resort to the half-duplex state when auto-negotiation is not available. a duplex mismatch will occur if the remote device is operating in full-duplex mode. to determine whether or not the remote link supports auto-negotiation, check the value of the lpanabl bit (phane<0>). auto-negotiation is enabled by default at power-up, but can be disabled by clearing the anen bit. to restart the auto-negotiation process, set reneg (phcon1<9>). after setting reneg, the hardware automatically clears this bit to 0 immediately. during auto-negation, the information in the phana register is advertised to the link partner by transmitting the information encoded in the fast link pulses. the andone bit (phstat1<5>) is set by the hardware when the auto-negotiation process completes. the value of spddpx<2:0> (phstat3<4:2>) indicates which operation mode has been selected. the remote link partners capabilities are also stored in the phanlpa register. note: when auto-negotiation is enabled, spd100 (phcon1<13>) and pfuldpx (phcon1<8>) are control only bits. they have no effect on speed or duplex modes and do not indicate the current selection when read. downloaded from: http:///
enc424j600/624j600 ds39935c-page 110 ? 2010 microchip technology inc. when linkif link status change interrupt flag is set, it means auto-negotiation or parallel detection is complete. once auto-negotiation is complete, the mac registers related to duplex mode must be reconfigured. determine the new duplex mode by reading the phydpx bit (estat<10>). once this is done, update the macon2, maclcon, maipg and mabbipg registers as described in section 8.9 after link establishment . register 12-1: phcon1: phy control register 1 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 prst ploopbk spd100 (1) anen psleep r reneg pfuldpx (1) bit 15 bit 8 r/w-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r r r r r r r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 prst: phy reset bit 1 = perform phy reset. hardware automatically clears this bit to 0 when the reset is complete. 0 = phy is not in reset (normal operation) bit 14 ploopbk: phy loopback enable bit 1 = loopback is enabled 0 = normal operation bit 13 spd100: phy speed select control bit (1) 1 = 100 mbps 0 = 10 mbps bit 12 anen: phy auto-negotiation enable bit 1 = auto-negotiation is enabled. spd100 and pfuldpx are ignored. 0 = auto-negotiation is disabled. spd100 and pfuldpx control the operating speed and duplex. bit 11 psleep: phy sleep enable bit 1 = phy is powered down 0 = normal operation bit 10 reserved: write as 0 , ignore on read bit 9 reneg: restart auto-negotiation control bit 1 = restart the auto-negotiation process. hardware automatically clears this bit to 0 when the auto-negotiation process starts. 0 = normal operation bit 8 pfuldpx: phy duplex select control bit (1) 1 = full duplex 0 = half duplex bit 7 reserved: write as 0 , ignore on read bit 6-0 reserved: ignore on read note 1: applicable only when auto-negotiation is disabled (anen = 0 ). downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 111 enc424j600/624j600 register 12-2: phstat1: phy status register 1 r-0 r-1 (1) r-1 (1) r-1 (1) r-1 (1) r-0 r-0 r-0 r full100 half100 full10 half10 r r r bit 15 bit 8 r-0 r-0 r-0 r/lh-0 r-1 (1) r/ll-0 r-0 r-1 (1) r r andone lrfault anable llstat r extregs bit 7 bit 0 legend: ll = latch low bit u = unimplemented bit, read as 0 r = readable bit w = writable bit lh = latch high bit ll = latch-low bit -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 reserved: read as 0 bit 14 full100: 100base-tx full-duplex ability status bit 1 = phy is capable of 100base-tx full-duplex operation (1) bit 13 half100: 100base-tx half-duplex ability status bit 1 = phy is capable of 100base-tx half-duplex operation (1) bit 12 full10: 10base-t full-duplex ability status bit 1 = phy is capable of 10base-t full-duplex operation (1) bit 11 half10: 10base-t half-duplex ability status bit 1 = phy is capable of 10base-t half-duplex operation (1) bit 10-6 reserved: ignore on read bit 5 andone: auto-negotiation done status bit 1 = auto-negotiation is complete 0 = auto-negotiation is disabled or still in progress bit 4 lrfault: latching remote fault condition status bit 1 = remote fault condition has been detected. this bit latches high and automatically returns to 0 after phstat1 is read. 0 = no remote fault has been detected since the last read of phstat1 bit 3 anable: auto-negotiation ability status bit 1 = phy is capable of auto-negotiation (1) bit 2 llstat: latching link status bit 1 = ethernet link is established and has stayed continuously established since the last read of phstat1 0 = ethernet link is not established or was not established for a per iod since the last read of phstat1 bit 1 reserved: ignore on read bit 0 extregs: extended capabilities registers present status bit 1 = phy has extended capability registers at addresses, 16 thru 31 (1) note 1: this is the only valid state for this bit; a 0 represents an invalid condition. downloaded from: http:///
enc424j600/624j600 ds39935c-page 112 ? 2010 microchip technology inc. register 12-3: phstat2: phy status register 2 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r r r r r r r r bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r-1 r-0 r-1 r-1 r r rp l r i t y r r r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 reserved: write as 0 , ignore on read bit 4 plrity: tpin+/- polarity status bit (applies to 10base-t only) 1 = wiring on the tpin+/- pins is reversed polarity . phy internally swaps the tpin+/- signals to get the correct polarity. 0 = wiring on the tpin+/- is correct polarity bit 3-0 reserved: ignore on read register 12-4: phstat3: phy status register 3 r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r r r r bit 15 bit 8 r/w-0 r/w-1 r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r r r spddpx2 spddpx1 spddpx0 r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 reserved: write as 0 , ignore on read bit 6 reserved: write as 1 bit 5 reserved: write as 0 , ignore on read bit 4-2 spddpx<2:0>: current operating speed and duplex status bits 111 = reserved 110 = 100 mbps, full duplex 101 = 10 mbps, full duplex 100 = reserved 011 = reserved 010 = 100 mbps, half duplex 001 = 10 mbps, half duplex 000 = reserved bit 1-0 reserved: write as 0 , ignore on read downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 113 enc424j600/624j600 register 12-5: phana: phy auto-negotiation advertisement register r-0 r-0 r/w-0 r-0 r/w-0 r/w-0 r-0 r/w-1 adnp ra d f a u l t r adpaus1 adpaus0 ra d 1 0 0 f d bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 ad100 ad10fd ad10 adieee4 adieee3 adieee2 adieee1 adieee0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adnp: advertise next page ability bit 1 = invalid 0 = local phy does not support auto-negotiation next page abilities bit 14 reserved: read as 0 bit 13 adfault: advertise remote fault condition bit 1 = local phy has a fault condition present 0 = local phy does not have a fault condition present bit 12 reserved: read as 0 bit 11-10 adpaus<1:0>: advertise pause flow control ability bits 11 = local device supports both symmetric pause and asymmetric pause toward local device 10 = local device supports asymmetric pause toward link partner only 01 = local device supports symmetric pause only (normal flow control mode) 00 = local device does not support pause flow control bit 9 reserved: read as 0 bit 8 ad100fd: advertise 100base-tx full-duplex ability bit 1 = local phy is capable of 100base-tx full-duplex operation 0 = local phy is incapable of 100base-tx full-duplex operation bit 7 ad100: advertise 100base-tx half-duplex ability bit 1 = local phy is capable of 100base-tx half-duplex operation 0 = local phy is incapable of 100base-tx half-duplex operation bit 6 ad10fd: advertise 10base-t full-duplex ability bit 1 = local phy is capable of 10base-t full-duplex operation 0 = local phy is incapable of 10base-t full-duplex operation bit 5 ad10: advertise 10base-t half-duplex ability bit 1 = local phy is capable of 10base-t half-duplex operation 0 = local phy is incapable of 10base-t half-duplex operation bit 4-0 adieee<4:0>: advertise ieee standard selector field bits 00001 = ieee 802.3 std. all other values reserved by ieee. always specify a selector value of 00001 for this device. downloaded from: http:///
enc424j600/624j600 ds39935c-page 114 ? 2010 microchip technology inc. register 12-6: phanlpa: phy auto-negotiation link partner ability register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 lpnp lpack lpfault r lppaus1 lppaus0 lp100t4 lp100fd bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 lp100 lp10fd lp10 lpieee4 lpieee3 lpieee2 lpieee1 lpieee0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 lpnp: link partner next page ability bit 1 = link partner phy supports auto-negotiation next page abilities 0 = link partner phy does not support auto-negotiation next page abilities bit 14 lpack: link partner acknowledge local phy code word status bit 1 = link partner phy has successfully received the local phy abilities saved in phana 0 = link partner phy has not received the local phy abilities saved in phana bit 13 lpfault: link partner remote fault condition bit 1 = link partner phy has a fault condition present 0 = link partner phy does not have a fault condition present bit 12 reserved: ignore on read bit 11-10 lppaus<1:0>: link partner pause flow control ability bits 11 = link partner supports both symmetric pause and asymmetric pause toward local device. link partner generates and responds to pause control frames. alternatively, if the local device only supports asymmetric pause, the link partner will respond to pause control frames, but not generate any. 10 = link partner supports asymmetric pause toward local device only; it can transmit pause control frames, but cannot act upon pause frames sent to it 01 = link partner supports symmetric pause only, and generates and responds to pause control frames 00 = link partner does not support pause flow control bit 9 lp100t4: link partner 100base-t4 ability bit 1 = link partner phy is capable of operating in 100base-t4 mode 0 = link partner phy is incapable of operating in 100base-t4 mode bit 8 lp100fd: link partner 100base-tx full-duplex ability bit 1 = link partner phy is capable of 100base-tx full-duplex operation 0 = link partner phy is incapable of 100base-tx full-duplex operation bit 7 lp100: link partner 100base-tx half-duplex ability bit 1 = link partner phy is capable of 100base-tx half-duplex operation 0 = link partner phy is incapable of 100base-tx half-duplex operation bit 6 lp10fd: link partner 10base-t full-duplex ability bit 1 = link partner phy is capable of 10base-t full-duplex operation 0 = link partner phy is incapable of 10base-t full-duplex operation bit 5 lp10: link partner 10base-t half-duplex ability bit 1 = link partner phy is capable of 10base-t half-duplex operation 0 = link partner phy is incapable of 10base-t half-duplex operation bit 4-0 lpieee<4:0>: link partner ieee standard selector field bits 00001 = ieee 802.3 std. all other values are reserved by ieee. remote node should also specify this as the selector value. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 115 enc424j600/624j600 register 12-7: phane: phy auto- negotiation expansion register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r r r r r r r r bit 15 bit 8 r-0 r-0 r-0 r/lh-0 r-0 r-0 r/lh-0 r-0 r r rp d f l t r r lparcd lpanabl bit 7 bit 0 legend: lh = latch high bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 reserved: ignore on read bit 4 pdflt: parallel detection fault status bit 1 = parallel detection did not detect a valid link partner; automatically cleared when register is read 0 = parallel detection is still in progress or a valid link partner is connected bit 3-2 reserved: ignore on read bit 1 lparcd: link partner abilities received status bit 1 = phanlpa register has been written with a new value from the link partner; automatically cleared when register is read 0 = phanlpa contents have not changed since the last read of phane bit 0 lpanabl: link partner auto-negotiation able status bit 1 = link partner implements auto-negotiation 0 = link partner does not implement auto-negotiation downloaded from: http:///
enc424j600/624j600 ds39935c-page 116 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 117 enc424j600/624j600 13.0 interrupts enc424j600/624j600 devices have multiple interrupt sources tied to a single output pin, allowing the device to signal the occurrence of events to the host controller. the interrupt pin is active-low and is designed for use by host controllers that can detect falling edges. interrupts can also be used on a polling basis without connecting the interrupt pin. to use interrupts in this manner, monitor the int bit (estat<15>) on a periodic basis. interrupts are managed by two registers. the eie reg- ister contains the individual interrupt enable bits for each interrupt driven by the mac and cryptographic components. the eir register holds the individual interrupt flags. when an interrupt occurs, the corresponding interrupt flag is set. if the interrupt is enabled and the intie (eie<15>) global interrupt enable bit is set, the int pin is driven low and the int flag (estat<15>) becomes set. this logic is shown in figure 13-1. even when an interrupt is not enabled, its corresponding interrupt flags are still set when the interrupt condition occurs. this allows the host controller to poll for certain lower priority events while using the interrupt pin for more important tasks. when an enabled interrupt occurs, the int pin remains low until all flags causing interrupts are cleared or masked off (the enable bit is cleared). if more than one interrupt source is enabled, the host controller must poll each flag to determine the source(s) of the interrupt. a good practice is for the host controller to clear the global interrupt enable bit, intie (eie<15>), immedi- ately after an interrupt event. this causes the interrupt pin to return to the non-asserted (high) state. once the interrupt has been serviced, the intie bit is set again to re-enable interrupts. if a new interrupt occurs while servicing another, the act of resetting the global enable bit will cause a new falling edge to occur on the interrupt pin and ensure that the host does not miss any events. when clearing eir interrupt flags, it is required that bit- oriented operations be used. these include bit field set and bit field clear opcodes for the spi interface, and using the bit set and bit clear registers for the psp interfaces. this procedure ensures that interrupts occurring during the write procedure are not inadvertently missed. figure 13-1: enc424j600/624j600 interrupt logic int intie linkie linkif aesie aesif hashie hashif modexie modexif eir/eie rxabtie rxabtif txabtie txabtif txie txif dmaie dmaif pktie pktif pcfulie pcfulif downloaded from: http:///
enc424j600/624j600 ds39935c-page 118 ? 2010 microchip technology inc. register 13-1: eir: ethernet interrupt flag register r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-1 r/w-0 crypten modexif hashif aesif linkif r r r bit 15 bit 8 r/w-0 r-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 rp k t i fd m a i f r txif txabtif rxabtif pcfulif bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 crypten: modular exponentiation and aes cryptographic modules enable bit 1 = all cryptographic engine modules are enabled 0 = modular exponentiation and aes modules are disabled and powered down; md5/sha-1 hashing is still available bit 14 modexif: modular exponentiation interrupt flag bit 1 = modular exponentiation calculation is complete 0 = no interrupt pending bit 13 hashif: md5/sha-1 hash interrupt flag bit 1 = md5/sha-1 hash operation is complete 0 = no interrupt pending bit 12 aesif: aes encrypt/decrypt interrupt flag bit 1 = aes encrypt/decrypt operation is complete 0 = no interrupt pending bit 11 linkif: phy link status change interrupt flag bit 1 = phy ethernet link status has changed. read phylnk (estat<8>) to determine the current state. 0 = no interrupt pending bit 10-7 reserved: ignore on read, dont care on write bit 6 pktif: rx packet pending interrupt flag bit 1 = one or more rx packets have been saved and are ready for software processing. the pktcnt<7:0> (estat<7:0>) bits are non-zero. to clear this flag, decrement the pktcnt bits to zero by setting pktdec (econ1<8>). 0 = no rx packets are pending bit 5 dmaif: dma interrupt flag bit 1 = dma copy or checksum operation is complete 0 = no interrupt pending bit 4 reserved: ignore on read, dont care on write bit 3 txif: transmit done interrupt flag bit 1 = packet transmission has completed. txrts (econ1<1>) has been cleared by hardware. 0 = no interrupt pending bit 2 txabtif: transmit abort interrupt flag bit 1 = packet transmission has been aborted due to an error. read the etxstat register to determine the cause. txrts (econ1<1>) has been cleared by hardware. 0 = no interrupt pending downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 119 enc424j600/624j600 bit 1 rxabtif: receive abort interrupt flag bit 1 = an rx packet was dropped because there is insufficient space in the rx buffer to store the complete packet or the pktcnt field is saturated at ffh 0 = no interrupt pending bit 0 pcfulif: packet counter full interrupt flag bit 1 = pktcnt field has reached ffh. software must decrement the packet counter to prevent the nex t rx packet from being dropped. 0 = no interrupt pending register 13-1: eir: ethernet interrupt flag register (continued) downloaded from: http:///
enc424j600/624j600 ds39935c-page 120 ? 2010 microchip technology inc. register 13-2: eie: ethernet interrupt enable register r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 intie modexie hashie aesie linkie r r r bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-1 r/w-0 r/w-0 r/w-0 r/w-0 r pktie dmaie r (1) txie txabtie rxabtie pcfulie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 intie: int global interrupt enable bit 1 = int pin is controlled by the int status bit (estat<15>) 0 = int pin is driven high bit 14 modexie: modular exponentiation interrupt enable bit 1 = enabled 0 = disabled bit 13 hashie: md5/sha-1 hash interrupt enable bit 1 = enabled 0 = disabled bit 12 aesie: aes encrypt/decrypt interrupt enable bit 1 = enabled 0 = disabled bit 11 linkie: phy link status change interrupt enable bit 1 = enabled 0 = disabled bit 10-7 reserved: write as 0 bit 6 pktie: rx packet pending interrupt enable bit 1 = enabled 0 = disabled bit 5 dmaie: dma interrupt enable bit 1 = enabled 0 = disabled bit 4 reserved: ignore on read, dont care on write (1) bit 3 txie: transmit done interrupt enable bit 1 = enabled 0 = disabled bit 2 txabtie: transmit abort interrupt enable bit 1 = enabled 0 = disabled bit 1 rxabtie: receive abort interrupt enable bit 1 = enabled 0 = disabled bit 0 pcfulie: packet counter full interrupt enable bit 1 = enabled 0 = disabled note 1: this bit is read-only and cannot be cleared. hardware does not modify it. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 121 enc424j600/624j600 13.1 interrupt sources enc424j600/624j600 devices have multiple interrupt sources, each individually selectable. the various interrupt sources are described in the following sections. for any of the following interrupts to propagate out of the device, the intie (eie<15>) global interrupt enable must be set. 13.1.1 modular exponentiation complete the modular exponentiation complete interrupt occurs when a modular exponentiation operation is com- pleted. this flag is set when modexst (econ1<15>) is cleared. the interrupt should be cleared by software once it has been serviced. to enable the modular exponentiation complete interrupt, set modexie (eie<14>). for more information on the modular exponentiation feature, refer to section 15.1 modular exponentiation . 13.1.2 md5/sha-1 hash complete the md5/sha-1 hash complete interrupt occurs when the hashing module completes a block or calculation. the interrupt flag is required when using the hashing engine; therefore, the flag must be cleared by software after the interrupt has been serviced. to enable the md5/sha-1 complete interrupt, set hashie (eie<13>). for more information on the md5/sha-1 hashing feature, refer to section 15.2 md5 and sha-1 hashing . 13.1.3 aes complete the advanced encryption standard (aes) complete interrupt occurs when a block has been encrypted or decrypted using the aes engine. this flag is set when aesst (econ1<11>) is cleared. the interrupt should be cleared by software once it has been serviced. to enable the aes complete interrupt, set aesie (eie<12>). for more information on the advanced encryption standard engine, refer to section 15.3 advanced encryption standard (aes) . 13.1.4 link change the link change interrupt occurs when the phy link status changes. this flag is set by hardware when a link has either been established or broken between the device and a remote ethernet partner. the current link status can be read from phylnk (estat<8>). the interrupt should be cleared by software once it has been serviced. to enable the link change interrupt, set linkie (eie<11>). 13.1.5 received packet pending the received packet pending interrupt occurs when one or more frames have been received and are ready for software processing. this flag is set when the pktcnt<7:0> (estat<7:0>) bits are non-zero. this interrupt flag is read-only and will automatically clear when the pktcnt bits are decremented to zero. for more details about receiving and processing incoming frames, refer to section 9.0 transmitting and receiving packets . to enable the received packet pending interrupt, set pktie (eie<6>). the corresponding interrupt flag is pktif (eir<6>). 13.1.6 dma complete the dma complete interrupt occurs when a dma oper- ation (either copy or checksum calculation) completes. this flag is set when dmast (econ1<5>) is cleared. the interrupt should be cleared by software once it has been serviced. to enable the dma complete interrupt, set dmaie (eie<5>). 13.1.7 transmit complete the transmit complete interrupt occurs when the trans- mission of a frame has ended (whether or not it was successful). this flag is set when txrts (econ1<1>) is cleared. the interrupt should be cleared by software once it has been serviced. to enable the transmit complete interrupt, set txie (eie<3>). downloaded from: http:///
enc424j600/624j600 ds39935c-page 122 ? 2010 microchip technology inc. 13.1.8 transmit abort the transmit abort interrupt occurs when the transmis- sion of a frame has been aborted. an abort can occur for any of the following reasons: excessive collisions occurred as defined by the retransmission maximum, maxret<3:0> bits (maclcon<3:0>), setting. if this occurs, the colcnt bits (etxstat<3:0>) will indicate the number of collisions that occurred. a late collision occurred after 63 bytes were trans- mitted. if this occurs, latecol (etxstat<10>) will be set. the medium was busy and the packet was deferred. if this occurs, exdefer (etxstat<8>) will be set. the application aborted the transmission by clearing txrts (econ1<1>). the interrupt should be cleared by software once it has been serviced. to enable the transmit abort interrupt, set txabtie (eie<2>). 13.1.9 receive abort the receive abort interrupt occurs when the reception of a frame has been aborted. a frame being received is aborted when the head pointer attempts to overrun the tail pointer, or when the packet counter has reached ffh. in either case, the receive buffer is full and cannot fit the incoming frame, so the packet has been dropped. this interrupt does not occur when packets are dropped due to the receive filters rejecting a packet. the interrupt should be cleared by software once it has been serviced. to enable the receive abort interrupt, set rxabtie (eie<1>). the corresponding interrupt flag is rxabtif (eir<1>). 13.1.10 receive packet counter full the receive packet counter full interrupt occurs when the pktcnt (estat<7:0>) bits have reached ffh. this indicates that the counter for received frames is full and no more packets can be received. if a packet arrives after this flag is set, it will cause the receive abort interrupt flag to be set. this flag is cleared by hardware once the pktcnt bits are decremented. to enable the receive packet counter full interrupt, set pcfulie (eie<0>). 13.2 wake-on-lan/remote wake-up wake-on-lan or remote wake-up is useful for conserv- ing system power. the host controller and other subsystems can be placed in low-power mode, then configured to wake-up when a magic packet? is received by the enc424j600/624j600 devices. for wake-on-lan to operate correctly, the device must not be in low-power mode and the receive module must be enabled. when a magic packet arrives, the device wakes the host controller via the int signal. to configure the device for wake-on-lan: 1. set the host controller to wake-up on an external interrupt signal from int . 2. set crcen (erxfcon<6>), runten (erxfcon<4>) and mpen (erxfcon<14>). clear all other filter enable bits. this configures the device to only accept magic packets. 3. service all pending packets. 4. set pktie (eie<6>) and intie (eie<15>) to interrupt when a packet is accepted. 5. put the host controller and other subsystems to sleep to save power. once a magic packet is received, pktcnt is incre- mented to 1 , causing the device to assert the interrupt signal. when the host wakes up, it needs to restore the normal filter configuration and continue performing its tasks. for more details about the magic packet filter, refer to section 10.10 magic packet? collection filter . downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 123 enc424j600/624j600 14.0 direct memory access (dma) controller enc424j600/624j600 devices incorporate a direct memory access (dma) controller to reduce the burden on the host processor. the module serves the following purposes: copying data from one part of the packet buffer to another. copying data between the packet buffer and one of the memory mapped cryptographic engines. calculating a 16-bit checksum over a block of data, compatible with the checksum used in standard protocols, such as ip and tcp. in general, the application configures the dma opera- tion parameters (such as source and destination addresses), then sets the dmast (econ1<5>) bit to start the transfer or calculation. the hardware auto- matically clears the bit when the operation finishes. additionally, the module can be configured to set an interrupt flag on completion, as detailed in section 13.0 interrupts . the dma module follows the same address wrap-around logic as the indirect memory access interfaces described in section 3.5.5 indirect sram buffer access . when a read or write operation reaches the end of the user-defined area (uda) specified by eudand, it automatically wraps to eudast. when an operation reaches the end of the general purpose buffer, as indicated by erxst C 1, it automatically wraps to 0000h. finally, when an opera- tion reaches the end of the receive buffer (the last address in the physical memory space), it automatically wraps to erxst. if any of these areas share an ending address, the uda wrapping will take priority, followed by the general purpose buffer wrapping, then the receive buffer. the wrap-around applies to both the source and destination addresses as an operation progresses. although memory is organized by the 16-bit word, the dma accepts any byte address as the source and destination. it is also capable of operation over an even or an odd number of bytes. internally, the dma uses 16-bit accesses, so optimal efficiency is achieved when both the source and destination addresses are even, or when both are odd. copy operations from an odd source address to an even destination address or vice versa are allowed; however, performance will be dimin- ished by approximately 50% relative to copy operation on addresses that are aligned to each other. it is recommended that dma configuration parameters (such as address pointers and operation selection bits) not be modified while dmast (econ1<5>) is set and the dma is active. this requirement is additionally true for the eudand pointer, even if it is not located any- where within the source or destination memory ranges of the dma. after processing each memory word, the dma performs the necessary address wrap-around checks to increment to the next address(es). if the host controller writes to eudand at the exact moment the dma is performing an address wrap-around check, it is possible that the eudand register will be in a temporary incoherent state and the dma source or destination address will wrap to the eudast value unintentionally. depending upon the operation and the alignment of the source and destination addresses, the dma module typically requires between one and three clock cycles of osc1 per 16-bit word. any dma operation in progress can be cancelled by clearing the dmast bit. 14.1 copying memory the dma can copy any length of data from any address to any destination, including the corner case when the length is zero. source and destination addresses may be within the implemented sram area (0000h through 5fffh) or the cryptographic data area (7800h through 7c4fh). it is not possible to use the dma to read or write from sfrs. before initiating the first copy operation, verify that the ethen (econ2<15>) and clkrdy (estat<12>) bits are set. this does not need to be done for subsequent operations. to copy data from one location to another: 1. verify that the values of erxst, eudand and eudast (if applicable) are selecting the desired buffer wrapping configuration. 2. verify that dmast (econ1<5>) is clear, indicating that the module is idle. 3. set dmacpy (econ1<4>) to select a copy operation. 4. optionally, set dmanocs (econ1<2>) to prevent a checksum calculation. 5. set edmast to point to the source address. 6. set edmadst to point to the destination address. 7. set edmalen to indicate the number of bytes to copy. 8. set dmast to initiate the operation. 9. wait for the hardware to clear dmast to indicate completion. if the dma interrupt is enabled, it will be triggered when dmast is cleared. downloaded from: http:///
enc424j600/624j600 ds39935c-page 124 ? 2010 microchip technology inc. copy operations are performed starting with the first byte or word at the source address and incrementing forward. it is legal to use the dma to move a block of data backwards in memory, even if the source and destination memory ranges overlap. for example, if a 65-byte packet of data was located starting at memory address 0001h, and the application wished to move the whole packet to address 0000h, it may simply program edmast to 0001h and edmadst to 0000h. the non-overlapping byte at address 00041h will remain unchanged. similarly, it is also legal to move a block of data from an even aligned address to an immediately prior odd aligned address. for example, moving from 0002h to 0001h will work correctly with the final non-overlapping byte again remaining unchanged. since copy operations start at the beginning of the source address range and increment forward (as opposed to starting at the end of the source range and incrementing backwards), it is not possible to move blocks of data forward towards a higher memory address if the source and destination address ranges overlap. to perform this operation, the application must copy the source data to a non-overlapping temporary buffer location and then copy it from the temporary buffer to the final destination. 14.2 checksum calculations the dma module can compute an ip checksum value over a given range of bytes. checksums can be calcu- lated over a specific range of memory, or simultaneously as a copy operation progresses. remember to verify that the values of erxst, eudand and eudast (if applicable) are selecting the desired buffer wrapping configuration before starting any checksum operation. the checksum calculation logic treats the source data as a series of 16-bit big-endian integers. if the source data has an odd number of bytes, a padding byte of 00h will be added for the calculation. (this byte is not copied to the destination if the checksum is part of a copy operation.) the calculated checksum is the 16-bit ones complement of the ones complement sum of all 16-bit integers in the series. for example, if the bytes included in the checksum were {89h, abh, cdh}, the checksum would begin by calculating 89abh + cd00h. a carry would occur and the result would be 56ach. that value would be complemented to yield a checksum of a953h. to calculate a checksum without copying data: 1. verify that dmast (econ1<5>) is clear, indicating that the module is idle. 2. clear dmacpy (econ1<4>) to prevent a copy operation. 3. clear dmanocs (econ1<2>) to select a checksum calculation. 4. clear dmacssd (econ1<3>) to use the default seed of 0000h. see the paragraph below to seed a checksum with another value. 5. set edmast to point to the source address. 6. set edmalen to indicate the length of the input data. 7. set dmast to initiate the operation. 8. wait for the hardware to clear dmast to indicate completion. if the dma interrupt is enabled, it will be triggered when dmast is cleared. 9. read the computed checksum from edmacs. to calculate a checksum while copying data: 1. verify that dmast is clear, indicating that the module is idle. 2. set dmacpy to select a copy operation. 3. clear dmanocs to select a checksum calculation. 4. clear dmacssd to use the default seed of 0000h. see the paragraph below to seed a checksum with another value. 5. set edmast to point to the source address. 6. set edmadst to point to the destination address. 7. set edmalen to indicate the number of bytes to copy. 8. set dmast to initiate the operation. 9. wait for the hardware to clear dmast to indicate completion. if the dma interrupt is enabled, it will be triggered when dmast is cleared. 10. read the computed checksum from edmacs. the checksum can be seeded with a previous value if required. seeding may be useful when attempting to compute a checksum over non-contiguous blocks of data. to seed the checksum, set dmacssd (econ1<3>) before initiating the operation. the checksum calculation is seeded with the ones complement of the value contained in edmacs prior to the start of the dma operation. 14.3 dma performance the dma controller can operate at any time, without any regard to other modules in the device. several factors affect its speed of operation, including: ethernet transmit and receive utilization, especially at 100 mbps spi or psp read or write operations to the sram operating mode (copy versus checksum only) even-to-odd or odd-to-even source and destination addresses (copy mode) neglecting the time it takes software to program the dma control sfrs, under typical unloaded conditions, the dma will have a checksum only mode throughput of 100 mbytes/second. copy mode (with or without checksum) will achieve a typical throughput of 50 mbytes/second when the source and destination addresses share the same alignment. differing source and destination alignment would slow the process to 33.3 mbytes/second. worst case conditions can cut the dma throughput by no more than half of the typical values. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 125 enc424j600/624j600 15.0 cryptographic security engines to reduce the processing requirements of the host controller, enc424j600/624j600 devices incorporate three different cryptographic security engines. these security engines perform the types of encryptions, decryptions and mathematical computations that are most commonly used for network security functions. they accelerate the computation of public/private key pair negotiations, message hash authentication and bulk data encryption. the engines implemented are: modular exponentiation md5 and sha-1 hashing advanced encryption standard (aes) each engine operates from the cryptography data memory area, shown in section 3.4 cryptographic data memory . this memory block is not directly acces- sible through the spi or psp interfaces. instead, data must be copied into this memory area using the dma, as described in section 14.1 copying memory . the modules are controlled using bits from the econ2, econ1 and eir registers (registers 8-1, 9-1 and 13-1, respectively). each of the three modules have separate resources, so they may all be active simultaneously if necessary. each module also has its own interrupt that can be enabled to signal completion. refer to section 13.0 interrupts for details on using interrupts. all of the cryptographic security engines require that the ethernet enable bit, ethen (econ2<15>) to be set for operation. however, the phy, which consumes the majority of the device current, can be put to sleep if the application wishes to perform cryptographic operations without ethernet connectivity. the phy sleep function is controlled by the psleep bit (phcon1<11>). for greater information on power down capabilities, refer to 16.0 power-saving features . as a unit, the modular exponentiation and aes engines can be disabled to reduce the devices power consumption. this feature is controlled by the crypten bit (eir<15>). to enable modular exponentiation and aes engines, set crypten. by default, crypten is cleared and the modules are disabled on device power-up. the md5/sha-1 hashing module remains available regardless of the crypten state. 15.1 modular exponentiation modular exponentiation is the base function for the rsa and diffie-hellman algorithms used in public key cryptography. this module computes the value, y=x e mod m , where 0 ? x, y< m and e > 0 and 2 n-1 ? m < 2 n . n is the chosen operand size of 512, 768 or 1024. the modular exponentiation engine is controlled by the modexst bit (econ1<15>). setting this bit initiates the calculation. the engine automatically clears the bit when the operation is complete. clearing the bit in soft- ware aborts the calculation in progress and leaves the calculated value in an indeterminate state. the engine supports operand lengths of 512, 768 or 1024 bits. operand size is selected with the modlen<1:0> bits (econ2<3:2>). the modulus m and base x can be any value up to the maximum value supported by the chosen operand length. however, if x m , the result is not ensured to be correct. addition- ally, incorrect results will occur if the exponent e is 0 (this would return the same value as e = 1). shorter exponents may commonly be used when performing rsa encryption, which typically uses a 17-bit exponent length, or diffie hellman computations using a 180-bit exponent. for the modular exponentiation engine to work correctly, the most significant (msb) bit of m must be set. for example, when the modlen bits are config- ured for 1024-bit operation, m must be set such that 2 1023 m < 2 1024 . in other words, the modulus must exactly match the chosen operand length of 512 bits, 768 bits or 1024 bits. although it usually is, the modulus does not have to be a prime number. all operands must be stored in network (big-endian) byte order. if the base x or exponent e operands are shorter than the selected operand length, they should be right-justified and left-padded with zeros out to the chosen operand length. downloaded from: http:///
enc424j600/624j600 ds39935c-page 126 ? 2010 microchip technology inc. to perform a modular exponentiation: 1. copy the values for x , e and m into the 24-kbyte sram. 2. set crypten (eir<15>) to turn on the modular exponentiation module. 3. use the dma to transfer e to addresses, 7800h through 783fh (512-bit), 785f (768-bit) or 787fh (1024-bit). if the value is shorter than the chosen operand length, left-pad the value with zeros. 4. use the dma to transfer the value of x to addresses, 7880h through 78bfh (512-bit), 78df (768-bit) or 78ffh (1024-bit). if the value is shorter than the chosen operand length, left-pad the value with zeros. 5. use the dma to transfer m to addresses, 7900h through 793fh (512-bit), 795f (768-bit) or 797fh (1024-bit). the value must not be shorter than the chosen operand length. 6. set the value of the modlen<1:0> (econ2<3:2>) bits to indicate the size of the operation to be completed. 7. set modexst (econ1<15> = 1 ) to initiate the calculation. 8. wait for the hardware to clear modexst to indicate that the operation has completed. the hardware will also set modexif (eir<14>) and generate an interrupt, if enabled. 9. use the dma to transfer the result y from addresses, 7880h through 78bfh (512-bit), 78df (768-bit) or 78ffh (1024-bit). note that this result will be in big-endian format, and if necessary, the result will be left-padded with zeros. 10. if the aes module is not in use, save power by clearing crypten. use a bit field clear spi instruction or write to the eirclr register to clear this bit without corrupting any interrupt flags. assuming the operating length remains constant, the exponent e and modulus m are retained within the modular exponentiation engine and can be reused for future operations without being reloaded. 15.1.1 modular exponentiation performance the time required to compute the modular exponentiation result depends on three factors: the active length of the exponent e . the density of 1 bits in the exponent e . the length of the operands the time required for typical operations is summarized in table 15-1. table 15-1: typical modular exponentiation performance 15.2 md5 and sha-1 hashing the md5 and sha-1 hash engines implement one-way message digest functions. these functions take an unlimited amount of data and produce a digest of either 128 or 160 bits (for md5 and sha-1, respectively). they are frequently used for verification and integrity purposes. both hashing engines share the same resources, so only one operation may be active at a time. the current operation is selected by the sha1md5 (econ2<12>) bit. this bit should be configured before using the module. context switching is supported by the engine for applications that require the capability to switch between two or more hashing operations. the hashop (econ1<13>) bit configures the initial- ization values. when starting a new hash calculation, clear this bit to reset the initialization values. using this bit to load a previously saved context is described in section 15.2.3 context switching . the value of the hashop bit may not be changed once the hashen bit is set, so it must be configured first. usage operands (m/e) time dh 768/180 50.2 ms dh 1024/180 89.0 ms rsa 512/512 63.7 ms rsa 768/768 214.0 ms rsa 1024/1024 506.2 ms downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 127 enc424j600/624j600 set the hashen (econ1<14>) bit to enable the module and begin transferring data. once this bit is set, all data copied to the module through the dma will be added to the hash calculation. data should be written beginning at the hash data in address, 7a00h. after copying 64 bytes, the application must pause and wait for the hashif (eir<13>) bit to be set by the hardware. this flag indicates that the hardware has completed processing for that block. the application should then clear the hashif flag and continue with the next block, beginning transfers again at address 7a00h. before the final dma transfer is started, the application must set the hashlst bit (econ1<12>). when this bit is set, and a dma transfer is initiated to the hash engine, the engine pads the input appropriately for the selected algorithm and calculates the final result. once the hashif flag is set, the message digest is available in digest/state out, beginning at address 7a70h. the application must wait for the hashif flag after every 64-byte block, but all 64 bytes need not be transferred in one operation. for example, it is possible to transfer 16 bytes in one operation and the remaining 48 in a sec- ond. however, it is required that the dma stop copying data once a full 64-byte block is created. for example, if 16 bytes are transferred in one operation, and 52 in the next (for a total of 68 bytes), then the final four bytes will be lost and the output will be incorrect. note that the hash data in memory is not physically implemented, nor is it accessible for reading. transfers to any address in the range of 7a00h to 7a3fh instruct the dma to write directly to the hash engine. therefore, if 32 bytes are copied, beginning at 7a00h, a sub- sequent write of 32 bytes to the same address will not overwrite the previously written data. instead, the two 32-byte writes are appended to form a single 64-byte block and the hashing process begins. when making multiple transfers as part of a single 64-byte block, the second and subsequent transfers may begin, either at their sequential location, or they may all use the same destination address of 7a00h. with the exception of the final transfer, all data transfers to the hash engine must be of an integral length of 4 bytes. for example, chunks of 4, 8, 12, 16, etc. are legal, while dma transfers of length 1, 2, 3, 5, 6, 7, 9, 10, 11, etc. are illegal. optimal dma copy performance is also achieved when the source address is word or even aligned. to allow for hashes to be computed over any length of data, the integral length of 4 restriction does not apply to the last transfer (when hashlst is set). 15.2.1 md5 hashing the module implements the md5 function, as described in the internet engineering task force rfc 1321, the md5 message digest algorithm . the resulting digest is 128 bits (16 bytes) in length and is left-justified in the result space. to calculate an md5 digest: 1. clear sha1md5 (econ2<12>), hashop (econ1<13>) and hashlst (econ1<12>). 2. set hashen (econ1<14>). 3. clear hashif (eir<13>). 4. use the dma to transfer exactly 64 bytes to address 7a00h. this transfer may be split into multiple transactions if each copy operation is an integral length of 4 and the net of all transfers is 64 bytes. 5. wait for hashif to be set. 6. repeat steps 3 through 5 until fewer than 64 bytes remain. 7. clear hashif. 8. set hashlst (econ1<12>). 9. use the dma to transfer the remaining bytes to address 7a00h. 10. wait for hashif to be set. 11. use the dma to transfer the resulting 16-byte hash from address 7a70h. this 128-bit hash will be in big-endian byte order. 12. clear hashen. step 5 will take 500 ns from the time the dma com- pletes the transfer. under worst case conditions, the dma will take 3.94 ? s to copy a block of 64 bytes after the dmast bit is set. therefore, for maximum perfor- mance, applications may choose to omit step 3 and replace step 5 with a processor enforced wait of at least 4.5 ? s between the start of a dma copy operation and the start of the next dma copy operation of 64 bytes. steps 7 and 10 may also be optimized. however, the wait period should be extended to no less than 5.6 ? s as the hardware requires extra time to perform an extra padding step as required by the md5 algorithm. step 9 can be split into multiple dma copy transactions if step 8 is held off until immediately before the very last dma copy operation is performed. downloaded from: http:///
enc424j600/624j600 ds39935c-page 128 ? 2010 microchip technology inc. 15.2.2 sha-1 hashing the module implements the sha-1 function as described in the nist federal information processing standard (fips) publication 180-1 . the resulting digest is 160 bits (20 bytes) in length. to calculate a sha-1 digest: 1. set sha1md5 (econ2<12>). clear hashop and hashlst (econ1<13:12>). 2. set hashen (econ1<14>). 3. clear hashif (eir<13>). 4. use the dma to transfer exactly 64 bytes to address 7a00h. this transfer may be split into multiple transactions if each copy operation is an integral length of 4 and the net of all transfers is 64 bytes. 5. wait for hashif to be set. 6. repeat steps 3 through 5 until fewer than 64 bytes remain. 7. clear hashif. 8. set hashlst (econ1<12>). 9. use the dma to transfer the remaining bytes to address 7a00h. 10. wait for hashif to be set. 11. use the dma to transfer the resulting 20-byte hash from address 7a70h. this 160-bit hash will be in big-endian byte order. 12. clear hashen. like the md5 hashing case, steps 3, 5, 7 and 10 can be optimized by replacing them with enforced wait periods. however, sha-1 is slightly slower than md5 so a wait period of at least 4.7 ? s should be used in place of step 5 and at least 5.8 ? s for step 10. also, like the md5 case, step 9 can be split into multiple dma copy transactions if step 8 is held off until imme- diately before the very last dma copy operation is performed. 15.2.3 context switching at each 64-byte boundary, the current output state can be read from the module. this output state can be stored in memory elsewhere, then loaded back into the module at a later time to continue the hash. using this feature allows the engine to alternate between calculating two or more digests simultaneously. to make use of the context switching capability: 1. initiate a hash calculation. 2. after hashing an integral number of 64-byte blocks, wait for the hashif flag to be set. 3. read the current context from the module and store it elsewhere in memory. the context includes the digest/state out and length state out values, which comprise the 28 bytes starting at address 7a70h. 4. once the context has been saved, clear the hashen (econ1<14>) bit to disable the module. the module is now available to be used by other operations. when the application is ready to resume the previous calculation, restore the context to the initialization vector/state in and length state in values, beginning at 7a40h. then, set the hashop (econ1<13>) bit to indicate that a previous state is to be loaded from memory rather than initializing a new calculation. once this bit is set, setting the hashen bit allows the hash operation to proceed as usual. after the context has been saved, the module may be used for a different type of hash (md5 instead of sha-1, or vice versa). when loading a context back into the module, verify that sha1md5 (econ2<12>) selects the correct hash operation. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 129 enc424j600/624j600 to switch the context during a calculation: 1. configure sha1md5 (econ2<12>) to select the correct operation. 2. clear hashop (econ1<13>) to begin a new hash. 3. set hashen (econ1<14>). 4. clear hashif (eir<13>). 5. use the dma to transfer exactly 64 bytes to address 7a00h. this transfer may be split into multiple transactions if each copy operation is an integral length of 4 and the net of all transfers is 64 bytes. 6. wait for hashif to be set. 7. repeat steps 4 through 6 for as many complete 64-byte blocks as are ready to be hashed. 8. use the dma to transfer the resulting 28 bytes of context data, beginning at address 7a70h, to another location in memory. 9. clear hashen. 10. use the module for other operations as necessary. 11. configure sha1md5 as in step 1. 12. use the dma to transfer the 28 bytes of stored context to address 7a40h. 13. set hashop and hashen to resume a previous calculation. 14. continue using the module as previously described by hashing more data, then either saving the state or completing the calculation. it is important to note that the digest/state out only contains either a digest or a state out initialization vec- tor, but not both. if the hashlst bit is set before the final dma transfer, the value will indicate the final digest of all data processed so far. this digest is not a valid initialization vector and cannot be used to resume the hash. this is true even if the final transfer filled the buffer to a 64-byte boundary. likewise, if hashlst is clear before the final dma transfer, the value can only be used as an initialization vector. it will not be a valid hash of the message so far. therefore, applications that require the capability to calculate a hash, add more data and continue, should buffer up to 64 bytes in memory. only perform the hash operation on a block once the 65 th byte is ready to be hashed. this allows the application to select whether a digest or a state out initialization vector is desired before hashing a block. provided the context is stored, the application could request a digest, then reload the context and retransfer the data (beginning at the most recent 64-byte boundary) to continue the hashing operation where it was last stopped. 15.2.4 md5/sha-1 hash performance the implications noted in section 15.2.1 md5 hash- ing and section 15.2.2 sha-1 hashing are that the hashing engine is extremely fast and net through- put is primarily limited by the dma. using an open-loop method of skipping dma and hash status checking, it is possible to attain a net hashing throughput of 13.6 mbytes/second (108 mbits/second). practical considerations, such as the time it takes to send and receive the data between the ethernet and host microcontroller, will generally play a bigger roll in the total application performance. 15.3 advanced encryption standard (aes) the aes engine implements the advanced encryption standard (originally known as rijndael), as described in the nist federal information processing standard publication 197. this module can be used to encrypt or decrypt data using a known secret key. context switching is supported for applications that require the capability to alternate between two or more operations or keys. aes is a block cipher that must operate over 128-bit (16-byte) blocks. the application must apply any necessary padding, or strip any extraneous output bytes, as dictated by the desired padding scheme. no support for padding is included in the engine. 15.3.1 key support the aes engine supports 128, 192 and 256-bit key sizes. keys for aes are symmetric, meaning both parties must agree on a shared secret before the algorithm can be used. this is typically accomplished using an asym- metric algorithm, such as rsa, and/or is handled by a higher level protocol, such as secure socket layer (ssl) or transport layer security (tls). to load an encryption key: 1. verify that aesst (econ1<11>) is clear, indicating that the engine is idle. 2. configure aeslen<1:0> (econ2<1:0>) to select the correct key size. 3. use the dma to transfer the key data to address 7c00h. keys shorter than 256 bits should be left-aligned. aes generates a series of roundkeys from the encryp- tion key using an expansion function. while encryption begins at the first of these keys, decryption must start from the last one. the aes module includes a key expander, which calculates the roundkeys as needed by the encryption engine. to calculate the last round- key before beginning decryption, the engine must first be operated in encryption mode for one block. downloaded from: http:///
enc424j600/624j600 ds39935c-page 130 ? 2010 microchip technology inc. to initialize decryption using a known encryption key: 1. verify that aesst is clear, indicating that the engine is idle. 2. configure aeslen<1:0> to select the correct key size. 3. use the dma to transfer the encryption key to address 7c00h. keys shorter than 256 bits should be left-aligned. 4. configure aesop<1:0> (econ1<10:9>) to 00 . 5. set aesst to initiate the key expansion. 6. wait until the hardware clears the aesst flag. 15.3.2 context switching after each block is complete, the internal state may be saved in order to switch encryption keys or operations. context switching may only be performed when aesst (econ2<11>) is clear, indicating that the engine is idle. the values comprising the context varies depending on the mode selected. the sections describing each mode details which values must be saved. 15.3.3 block modes block ciphers are commonly used in one of five modes as described by the nist special publication 800-38a, recommendations for block cipher modes of operation: methods and techniques . the use of the aes engine in each of these modes is described in the following sections. four modes are natively supported in hardware: electronic code book (ecb) cipher block chaining (cbc) cipher feedback (cfb) output feedback (ofb) the fifth mode, counter (ctr), can be used with the addition of software support for the counter. 15.3.3.1 electronic code book mode (ecb) the electronic code book mode applies the aes encryption function directly to each plaintext block. no feedback is included, so the encryption of each block is completely independent of any previous block. assuming a given session key, any plaintext block will always yield to the same ciphertext block (and vice versa). if this is an undesirable property, a different block mode should be selected. figure 15-1 shows the use of ecb mode for encryption and decryption. figure 15-1: ecb encryption and decryption encrypter data key plaintext 0 key encrypter ciphertext 0 ciphertext 1 key decrypter data key decrypter plaintext 0 plaintext 1 ciphertext 0 encryption decryption data key plaintext 1 key key data key ciphertext 1 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 131 enc424j600/624j600 to encrypt a block using ecb mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> (econ1<10:9>) to 00 . 3. copy the plaintext message to texta at 7c20h. 4. set aesst (econ1<11>) to initiate the encryption. 5. wait for the hardware to clear aesst. 6. read the ciphertext message from texta at 7c20h. 7. repeat steps 3 through 6 for subsequent blocks. to decrypt a block using ecb mode: 1. initialize the decryption key as described in section 15.3.1 key support . 2. set aesop<1:0> to 10 . 3. copy the ciphertext message to texta at 7c20h. 4. set aesst to initiate the decryption. 5. wait for the hardware to clear aesst. 6. read the plaintext message from texta at 7c20h. 7. repeat steps 3 through 6 for subsequent blocks. the context for ecb mode includes only the encryption key. no additional context data needs to be saved. 15.3.3.2 cipher block chaining mode (cbc) the cipher block chaining mode uses feedback from the encryption output to further obscure the ciphertext data. during encryption, the first block uses an initial- ization vector (iv) which is xored with the plaintext data. the output of this xor function is then encrypted using the aes key and this ciphertext becomes the iv for the next block. under cbc mode, each subsequent block depends on the previous block. therefore, identical subsequent plaintext blocks use a different iv, and therefore, yield different ciphertext blocks. figure 15-2 shows the use of cbc mode for encryption and decryption. figure 15-2: cbc encry ption and decryption encrypter data key plaintext 0 key encrypter ciphertext 0 ciphertext 1 iv ciphertext 0 ciphertext 1 decrypter data key decrypter data key key key plaintext 1 plaintext 0 iv encryption decryption data key plaintext 0 key downloaded from: http:///
enc424j600/624j600 ds39935c-page 132 ? 2010 microchip technology inc. to encrypt a block using cbc mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> (econ1<10:9>) to 01 . 3. copy the initialization value (iv) to texta at 7c20h. 4. copy the plaintext message to textb at 7c30h. 5. set aesst (econ1<11>) to initiate the encryption. 6. wait for the hardware to clear aesst. 7. read the ciphertext message from texta at 7c20h. 8. repeat steps 4-7 for subsequent blocks. the ciphertext from the previous block automatically becomes the iv for the following block. to decrypt a block using cbc mode: 1. initialize the decryption key as described in section 15.3.1 key support . 2. set aesop<1:0> to 10 . 3. copy the initialization value (iv) to textb at 7c30h. 4. copy the ciphertext message to texta at 7c20h. 5. set aesst to initiate the decyption. 6. wait for the hardware to clear aesst. 7. read the plaintext message from xorout at 7c40h. 8. if another block is to be decrypted, copy the ciphertext message from this block to textb at 7c30h. the ciphertext from this block becomes the iv for the following one. 9. repeat steps 4-8 for subsequent blocks. the context for cbc mode consists of both the aes encryption key and the ciphertext from the most recent block. save the ciphertext from the previous block to be used as the iv when resuming the operation for additional blocks. 15.3.3.3 cipher feedback mode (cfb) cipher feedback mode is similar to cbc in that the ciphertext becomes the initialization vector (iv) for the subsequent block. however, in cfb mode, only the iv is encrypted, then xored with the plaintext to form the ciphertext. for the second and subsequent blocks, the ciphertext is passed through the encryption function again, then xored with the next plaintext block to become the ciphertext. like cbc mode, each subsequent block depends on the previous block. therefore, identical subsequent plaintext blocks will use a different iv, and therefore, yield different cipher- text blocks. figure 15-3 shows the use of cfb mode for encryption and decryption. figure 15-3: cfb encry ption and decryption note: only 128-bit cfb mode is natively supported. other less common implemen- tations, including 1-bit and 8-bit cfb modes, could be accomplished with support software, but are not detailed here. iv encrypter data key encrypter data key key key plaintext 0 plaintext 1 ciphertext 0 ciphertext 1 iv encrypter data key encrypter data key key key ciphertext 0 ciphertext 1 plaintext 0 plaintext 1 encryption decryption downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 133 enc424j600/624j600 to encrypt a block using cfb mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> (econ1<10:9>) to 00 . 3. copy the initialization value (iv) to texta at 7c20h. 4. set aesst (econ1<11>) to initiate the encryption. 5. copy the plaintext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the ciphertext message from xorout at 7c40h. 8. if more blocks need to be encrypted, set aesop<1:0> to 01 . this causes the engine to read from xorout rather than texta. 9. set aesst to initiate the encryption. 10. copy the plaintext message to textb at 7c30h. 11. wait for the hardware to clear aesst. 12. read the ciphertext message from xorout at 7c40h. 13. repeat steps 9 through 12 for subsequent blocks. the ciphertext from the previous block automatically becomes the iv for the following block. to decrypt a single block using cfb mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> to 00 . 3. copy the initialization value (iv) to texta at 7c20h. 4. set aesst to initiate the encryption. 5. copy the ciphertext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the plaintext message from xorout at 7c40h. 8. to decipher additional blocks, copy the previous blocks ciphertext to texta, then repeat steps 4 through 7. the context for cfb mode consists of both the aes encryption key and the ciphertext from the most recent block. save the ciphertext from the previous block to be used as the iv when resuming the operation for additional blocks. 15.3.3.4 output feedback mode (ofb) output feedback mode is nearly identical to cfb mode, except that in ofb mode, the initialization value (iv) for subsequent blocks is the output of the aes operation, not the ciphertext. the iv is encrypted using the aes engine, then xored with the plaintext to form the ciphertext. like cbc and cfb modes, identical subsequent plaintext blocks will use a different iv, and therefore, yield different ciphertext blocks. however, unlike cbc and cfb modes, this iv does not depend on the plaintext. figure 15-4 depicts the use of ofb mode for encryption and decryption. figure 15-4: ofb encryption and decryption iv encrypter data key encrypter data key key key plaintext 0 plaintext 1 ciphertext 0 ciphertext 1 iv encrypter data key encrypter data key key key ciphertext 0 ciphertext 1 plaintext 0 plaintext 1 encryption decryption downloaded from: http:///
enc424j600/624j600 ds39935c-page 134 ? 2010 microchip technology inc. to encrypt a block using ofb mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> (econ1<10:9>) to 00 . 3. copy the initialization value (iv) to texta at 7c20h. 4. set aesst (econ1<11>) to initiate the encryption. 5. copy the plaintext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the ciphertext message from xorout at 7c40h. 8. repeat steps 4 through 7 for subsequent blocks. the encryption output from the previous block automatically becomes the iv for the following block. to decrypt a block using ofb mode: 1. load the encryption key as described in section 15.3.1 key support . note that this mode does not make use of a decryption key. 2. set aesop<1:0> to 00 . 3. copy the initialization value (iv) to texta at 7c20h. 4. set aesst to initiate the encryption. 5. copy the ciphertext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the plaintext message from xorout at 7c40h. 8. repeat steps 4 through 7 for subsequent blocks. the context for ofb mode consists of both the aes encryption key and the encryption output from the most recent block. save the encryption block output from texta at 7c20h to be used as the iv when resuming the operation for additional blocks. 15.3.3.5 counter mode (ctr) counter mode is not directly supported by hardware, but can be implemented with software assistance. in ctr mode, a counter is used as the input to the encryption block. the encrypted output is then xored with the plaintext to yield the ciphertext, or vice versa. the counter does not necessarily need to be a true counter; any practically non-repeating function will suffice. when using ctr mode, the application must load the counter value before each block. since each block depends on the counter value, iden- tical subsequent plaintext blocks will yield different ciphertext blocks. whether or not these blocks are independent will depend on the selected counter function. figure 15-5 shows the use of ctr mode for encryption and decryption. figure 15-5: ctr encry ption and decryption encrypter data key encrypter data key key key plaintext 0 plaintext 1 ciphertext 0 ciphertext 1 ctr 0 ctr 1 encrypter data key encrypter data key key key ctr 0 ctr 1 ciphertext 0 ciphertext 1 plaintext 0 plaintext 1 encryption decryption downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 135 enc424j600/624j600 to encrypt a block using ctr mode: 1. load the encryption key as described in section 15.3.1 key support . 2. set aesop<1:0> (econ1<10:9>) to 00 . 3. copy the counter value to texta at 7c20h. 4. set aesst (econ1<11>) to initiate the encryption. 5. copy the plaintext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the ciphertext message from xorout at 7c40h. 8. repeat steps 3 through 7 for subsequent blocks. to decrypt a block using ctr mode: 1. load the encryption key as described in section 15.3.1 key support . note that this mode does not make use of a decryption key. 2. set aesop<1:0> to 00 . 3. copy the counter value to texta at 7c20h. 4. set aesst to initiate the encryption. 5. copy the ciphertext message to textb at 7c30h. 6. wait for the hardware to clear aesst. 7. read the plaintext message from xorout at 7c40h. 8. repeat steps 3 through 7 for subsequent blocks. the context for ctr mode consists of the aes encryp- tion key and the counter value. it is up to the application to determine what needs to be saved for the counter value context. downloaded from: http:///
enc424j600/624j600 ds39935c-page 136 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 137 enc424j600/624j600 16.0 power-saving features due to the high bandwidth and long cable length require- ments, ethernet applications can utilize a significant amount of power. enc424j600/624j600 devices include power-down and phy power management features to assist low-power applications. while features cannot completely mitigate power requirements, they can help reduce power consumption when the ethernet interface is not needed. 16.1 general power-down the encx24j600 may be placed in power-down mode through the command interface. in this mode, the device will no longer be able to transmit or receive any packets or perform dma operations. however, most registers, and all buffer memories, retain their states and remain accessible by the host controller. the clock driver also remains operational, leaving the clkout function unaffected. however, the mac/mii and phy registers all become inaccessible, and the phy registers lose their current states. to power-down the ethernet interface: 1. turn off the modular exponentiation and aes engines by clearing crypten (eir<15>). 2. turn off packet reception by clearing rxen (econ1<0>). 3. wait for any in-progress receptions to complete by polling rxbusy (estat<13>) until it is clear. 4. wait for any current transmission operation to complete by verifying that txrts (econ1<1>) is clear. 5. power-down the phy by setting the psleep bit (phcon1<11>). 6. power-down the ethernet interface by clearing ethen and strch (econ2<15,14>). dis- abling the led stretching behavior is necessary to ensure no leds get trapped in a perpetually illuminated state in the event they are being stretched on when ethen is cleared. to resume normal operation, the phy registers need to be reconfigured after wake-up. the typical restart sequence is: 1. wake-up the ethernet interface by setting ethen and strch (econ2<15,14>). 2. wake-up the phy by clearing psleep (phcon1<11>). care should be taken to modify only the psleep bit. 3. restore receive capabilities by setting rxen (econ1<0>). after leaving sleep mode, there will be a delay of several hundred milliseconds before a new link is established. if the host controller attempts to transmit any ethernet packets before the link is established, the phy will suppress the transmission onto the wire to avoid interfering with auto-negotiation or violating ieee 802.3 standards. the link status can be moni- tored through the link change interrupt flag, linkif (eir<11>), and phylnk status bit (estat<8>). 16.2 energy detect power-down enc424j600/624j600 devices also support an energy detect power-down mode. in this mode, the phy remains powered down until a signal is detected on the ethernet interface. while no packets can be sent or received, the internal phy configuration is maintained. this is useful for applications in which the ethernet cable may not always be connected, but need to automatically activate when a network cable is attached by the user and a link partner is detected. when a signal is detected on the ethernet medium, the edstat flag (phcon2<1>) is set. to enable energy detect power-down mode, set the edpwrdn bit (phcon2<13>). the phy auto- matically powers up and down based on the value of edstat. when in energy detect power-down, the host microcontroller should monitor the ethernet link status via the linkif interrupt flag and phylnk status bit. when linked, it should set ethen and strch (econ2<15,14>) and begin using the network inter- face as normal. when unlinked, it should clear ethen and strch to save power. to resume normal opera- tion, clear edpwrdn. while the phy is in energy detect power-down mode, the transmit logic will indefinitely hold off transmissions when unlinked. therefore, if the application attempts to transmit a packet by setting txrts (econ1<1>), this bit may not clear itself or cause a transmit interrupt to occur until the user plugs the device into another link partner. downloaded from: http:///
enc424j600/624j600 ds39935c-page 138 ? 2010 microchip technology inc. a device in energy detect power-down mode does not transmit link pulses, but passively listens for the remote link partner to transmit a signal in order to wake the device. if the remote device is also in a similar passive listening mode, neither device will wake-up. this should not cause problems for normal ethernet equipment, such as switches and routers, but may raise concerns if two embedded devices using this feature will be connected directly. 16.3 external power-down for applications that are extremely power-sensitive and have no need for memory or register retention, it may be useful to control the device using an external power-down circuit. this allows the host controller to completely remove power from the device. external power-down circuitry can be designed with either a mosfet on the power supply pins, or by using a regulator with output enable capabilities. keep in mind that an externally controlled power- down will require the encx24j600 to be completely re-initialized, as described in section 8.0 initialization . note: through compatibility testing, it has been observed that some 3rd party ethernet products do not transmit link pulses that are compliant with the ieee 802.3 stan- dard timing requirements. for such devices, the encx24j600 phy energy detect feature may be unable to wake-up. before enabling energy detect power- down, application designers should weigh the compatibility risks of using this feature, and where possible, implement a means of disabling it by the end product user. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 139 enc424j600/624j600 register 16-1: phcon2: phy control register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r edpwrdn r edthres r r r bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r-1 r/w-0 r r r r r frclnk edstat r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 reserved: write as 0 , ignore on read bit 13 edpwrdn: energy detect power-down enable bit 1 = energy detect power-down enabled. phy automatically powers up and down based on the state of edstat. 0 = energy detect power-down disabled. use this setting for maximal compatibility. bit 12 reserved: write as 0 , ignore on read bit 11 edthres: energy detect threshold control bit 1 = less energy is required to wake the phy from energy detect power-down 0 = normal energy detect threshold bit 10-3 reserved: write as 0 , ignore on read bit 2 frclnk: force link control bit 1 = force immediate link up, even when no link partner is present (100 mbps operation o nly) (1) 0 = normal operation bit 1 edstat: energy detect status bit 1 = energy detect circuit has detected energy on the tpin+/- pins within the last 256 ms 0 = no energy has been detected on the tpin+/- pins within the last 256 ms bit 0 reserved: write as 0 , ignore on read note 1: intended for testing purposes only. do not use in 10 mbps operation. downloaded from: http:///
enc424j600/624j600 ds39935c-page 140 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 141 enc424j600/624j600 17.0 electrical characteristics absolute maximum ratings storage temperature ............................................................................................................ ...................-65c to +150c ambient temperature under bias............................................................................................. -40 c to +85c (industrial) voltage on v dd , v ddosc , v ddpll , v ddrx and v ddtx , with respect to v ss ................................................. -0.3v to 4.0v voltage on any digital pin, with respect to v ss ............................................................................................. -0.3v to 6.0v voltage on osc1 and rbias analog pins, with respect to v ss .........................................................-0.3v to v dd + 0.3v voltage on tpin+/- and tpout+/-, with respect to v ss .............................................................................. -0.3v to 5.0v voltage on v cap , with respect to all v ss pins (note 1) ................................................................................ -0.3v to 2.0v esd protection on all pins..................................................................................................... ..................................... 2 kv current sourced or sunk by any digital output pin.............................................................................. .....................25 ma current out of all v ss pins.....................................................................................................................................420 ma current into all v dd pins.......................................................................................................................... ..............300 ma note 1: v cap is not designed to supply an external load. no external voltage should be applied to this pin. ? notice: stresses above those listed under maximum ratings may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. downloaded from: http:///
enc424j600/624j600 ds39935c-page 142 ? 2010 microchip technology inc. 17.1 dc characteristics: enc424j600/624j600 table 17-1: thermal operating conditions rating symbol min typ max unit enc424j600/624j600: operating junction temperature range t j -40 +125 c operating ambient temperature range t a -40 +85 c power dissipation: internal chip power dissipation: p int = v dd x (i dd C ? i oh ) p d p int + p i / o w i/o pin power dissipation: p i / o = ? ({v dd C v oh } x i oh ) + ? (v ol x i ol ) + ((v tpout + + v tpout -)/2 x i txct ) maximum allowed power dissipation p dmax (t j C t a )/ ? ja w table 17-2: thermal packaging characteristics characteristic symbol typ max unit notes package thermal resistance, 44-pin qfn (8x8x1 mm) ? ja 28 c/w (note 1) package thermal resistance, 44-pin tqfp (10x10x1 mm) ? ja 49.8 c/w (note 1) package thermal resistance, 64-pin tqfp (10x10x1 mm) ? ja 47 c/w (note 1) note 1: junction to ambient thermal resistance, theta- ja ( ? ja ) numbers are achieved by package simulations. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 143 enc424j600/624j600 table 17-3: dc characteristics: enc424j600/624j600 (industrial) dc characteristics standard operating conditions: -40c ? t a ? 85c, 3.0v ? v dd ? 3.6v (industrial) param. no. sym characteristic min typ max units conditions d001 v dd supply voltage 3.0 3.3 3.6 v d002 v por v dd start voltage to ensure internal power-on reset signal 1.75 1.95 v d003 s vdd v dd rise rate to ensure internal power-on reset signal 0.05 v/ms v ih input high voltage v d004 digital input pins 0.6 v dd 5 . 5 v d005 osc1 pin 0.7 v dd v dd v v il input low voltage d006 digital input pins v ss 0. 2 v dd v d007 osc1 pin v ss 0. 2 v dd v v oh output high voltage all digital output pins 2.4 v dd vi oh = -8ma v ol output low voltage all digital output pins v ss 0 . 4 vi ol = 8ma i wpu weak pull-up current -150 -260 -400 ? av dd = 3.3v, v pin = v ss i wpd weak pull-down current 28 56 112 ? av dd = 3.3v, v pin = v dd i il input leakage current digital input pins 1 ? av ss ? v pin ? v dd osc1 pin 150 ? av ss ? v pin ? v dd i dd supply current not linked 74 ma (note 1) 100base-tx linked, idle 96 ma (note 1) 100base-tx linked, maximum tx utilization 9 61 1 7m a (note 1) 10base-t linked, idle 82 ma (note 1) 10base-t linked, maximum tx utilization 8 21 0 3m a (note 1) ? i ct cryptographic module current 40 ma eir<15> = 1 i txct tx transformer center tap current not linked 1 ma 100base-tx linked 30 ma 10base-t linked 80 ma note 1: excludes tx transformer center tap and leda/led b currents; cryptographic engine module disabled (eir<15> = 0 ). 2: cryptographic engine module disabled (eir<15> = 0 ), auto-negotiation disabled (phcon1<12> = 0 ) and ethernet disabled (econ2<15> = 0 ). 3: measured across 100 ? termination on cable side of transformer. downloaded from: http:///
enc424j600/624j600 ds39935c-page 144 ? 2010 microchip technology inc. table 17-4: internal voltage regulator specifications table 17-5: requirements for external magnetics i pd power-down current (2) energy detect power-down 29.2 34 ma phcon2<13> = 1 sleep 23.8 28 ma phcon1<11> = 1 v tpout peak differential output voltage v 100base-tx 0.95 1.00 1.05 v (note 3) 10base-t 2.2 2.5 2.8 v (note 3) v sq 10base-t rx differential squelch threshold 160 300 585 mv operating conditions: -40c < t a < +85c (unless otherwise stated) param no. symbol characteristics min typ max units comments v rgout regulator output voltage 1.62 1.80 1.98 v c efc external filter capacitor value 4.7 10 ? f capacitor must have low series resistance (< 3 ?? parameter min norm max units conditions rx transformer turns ratio 1:1 tx transformer turns ratio 1:1 transformer center tap = 3.3v insertion loss 1.1 db primary inductance 350 ? h 8 ma bias transformer isolation 1.5 kv differential to common-mode rejection 40 db 0.1 to 10 mhz return loss -16 db table 17-3: dc characteristics: enc424j600/624j600 (industrial) (continued) dc characteristics standard operating conditions: -40c ? t a ? 85c, 3.0v ? v dd ? 3.6v (industrial) param. no. sym characteristic min typ max units conditions note 1: excludes tx transformer center tap and leda/led b currents; cryptographic engine module disabled (eir<15> = 0 ). 2: cryptographic engine module disabled (eir<15> = 0 ), auto-negotiation disabled (phcon1<12> = 0 ) and ethernet disabled (econ2<15> = 0 ). 3: measured across 100 ? termination on cable side of transformer. downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 145 enc424j600/624j600 17.2 ac characteristics: enc424j600/624j600 (industrial) table 17-6: oscillator timing characteristics table 17-7: clkout pin timing specifications table 17-8: clkout pin ac characteristics ac characteristics standard operating conditions -40c ?? t a ?? +85c, 3.00v ?? v dd ?? 3.60v (industrial) param. no. sym characteristic min max units conditions f osc clock in frequency 25 25 mhz t osc clock in period 40 40 ns t duty duty cycle (external clock input) 40 60 % ? f clock frequency error ? 50 ppm param. no. sym characteristic min typ max units conditions f clkout clkout frequency dc 33.3 mhz t duty clkout duty cycle 40 50 60 % all prescaler settings except divide by 12.5 37.5 47.5 57.5 % divide by 12.5 prescaler param. no. sym characteristic min max units conditions t r clkout clkout pin rise time 3 ns (note 1) t f clkout clkout pin fall time 4 ns (note 1) ? clkout clkout stability (jitter) 0.25 % note 1: measured from 0.1 v dd to 0.9 v dd with a load of 10 pf. downloaded from: http:///
enc424j600/624j600 ds39935c-page 146 ? 2010 microchip technology inc. figure 17-1: spi input timing figure 17-2: spi output timing table 17-9: spi interface ac characteristics sym characteristic min typ max units conditions f sck spi clock frequency dc 14 mhz t duty sck duty cycle 45 55 % t css cs setup time 50 ns t csh cs hold time 50 ns t csd cs disable time 20 ns t su data setup time 10 ns t hd data hold time 10 ns t v output valid from clock low 10 ns load on so pin = 30 pf t dis output disable time 10 ns load on so pin = 30 pf cs sck si so t css t hd t su t csd lsb in msb in high-impedance t csh 1/f sck cs sck so msb out lsb out t dis dont care si t v t v lsb in 1/f sck downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 147 enc424j600/624j600 table 17-10: psp interface timing specifications sym characteristic min typ max units comments t psp 1 cs, address, r/w setup time 1 ns t psp 2 rd, en, bxsel to data valid 75 ns t psp 3 data output hold time 0 3 ns t psp 4 rd, en, bxsel deassertion time 4 . 5 n s t psp 5c s , r / w setup time 3.5 ns t psp 6 address setup time 3.5 ns t psp 7 data setup time 3.5 ns t psp 8 wr, wrl, wrh, en, bxsel assertion time 6 . 5 n s t psp 9a d d r e s s h o l d t i m e 1 n s t psp 10 data input hold time 1 ns t psp 11 wr, wrl, wrh, en, bxsel deassertion time 4.5 ns sfr access 4 0 n ss r a m a c c e s s t psp 12 cs, address setup time 6.5 ns t psp 13 al assertion time 6.5 ns t psp 14 address hold time 1 ns t psp 15 al deassertion time 4 ns downloaded from: http:///
enc424j600/624j600 ds39935c-page 148 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 149 enc424j600/624j600 18.0 packaging information 18.1 package marking information legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week 01) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note : in the event the full microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e xxxxxxxxxx 44-lead qfn xxxxxxxxxx xxxxxxxxxx yywwnnn enc424j600 example -i/ml 1010017 44-lead tqfp xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example enc424j600 -i/pt 1010017 64-lead tqfp (10x10x1mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example enc624j600 -i/pt 1010017 3 e 3 e 3 e downloaded from: http:///
enc424j600/624j600 ds39935c-page 150 ? 2010 microchip technology inc. 18.2 package details the following sections give the technical details of the packages. 
 
   !   "   !" # $% &" '  ()"&'"!&)  & #*&&  & #     + !! *! " & # , ' !  #&   
-./ 012 0 !' !  &  $ & " !**&"&&   ! -32  %   ' !("!" *&"&&   (%%' &
"
! !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  5&! 66-- ' !6'&! 7 78 9 7"') %! 7  & /01 8  :  &  ;   & #%%    / 1& &+ !! , -3 8  <#& - ;01 -$
! # #<#& - , / ; 8  6  &  ;01 -$
! # #6  &  , / ; 1& &<#& ) / , ,; 1& &6  & 6 ,  / 1& & & -$
! # # =  > > d exposed pad d2 eb k l e2 2 1 n note 1 2 1 e n bottom view top view a3 a1 a 
    * 1 ,0 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 151 enc424j600/624j600 
 
   !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  downloaded from: http:///
enc424j600/624j600 ds39935c-page 152 ? 2010 microchip technology inc. 
 #$ %
 & #'('(')*(( # !   "   !" # $% &" '  ()"&'"!&)  & #*&&  & #    1 '% ! & !  
& ?!@ '   , ' !! #-#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
-./ 012 0 !' !  &  $ & " !**&"&&   ! -32  %   ' !("!" *&"&&   (%%' &
"
! !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  5&! 66-- ' !6'&! 7 78 9 7"') %6 #! 7  6 #& ;01 8  :  &  > >  # # + + !!  /  / & #%%  / > / 3&6  & 6 /  / 3&
& 6 -3 3&   a ,/a a 8  <#& - 01 8  6  &  01 # # + <#& - 01 # # + 6  &  01 6 #+ !!   >  6 #<#& ) , , / # %&  
 a a ,a # %&  0&&'  a a ,a a e e1 d d1 e b note 1 note 2 n 123 c a1 l a2 l1 
    * 1 0 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 153 enc424j600/624j600 
 #$ %
 & #'('(')*(( # !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  downloaded from: http:///
enc424j600/624j600 ds39935c-page 154 ? 2010 microchip technology inc. +
 #$ %
 & # '('(')*(( # !   "   !" # $% &" '  ()"&'"!&)  & #*&&  & #    1 '% ! & !  
& ?!@ '   , ' !! #-#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
-./ 012 0 !' !  &  $ & " !**&"&&   ! -32  %   ' !("!" *&"&&   (%%' &
"
! !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  5&! 66-- ' !6'&! 7 78 9 7"') %6 #! 7  6 #& /01 8  :  &  > >  # # + + !!  /  / & #%%  / > / 3&6  & 6 /  / 3&
& 6 -3 3&   a ,/a a 8  <#& - 01 8  6  &  01 # # + <#& - 01 # # + 6  &  01 6 #+ !!   >  6 #<#& )    # %&  
 a a ,a # %&  0&&'  a a ,a d d1 e e1 e b n note 1 123 note 2 c l a1 l1 a2 a 
    * 1 ;/0 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 155 enc424j600/624j600 +
 #$ %
 & #'('(')*(( # !  " 3& '!&" &
+ # * !(
 ! ! & 
 +  
% & & # & &&
244***'
'4
+  downloaded from: http:///
enc424j600/624j600 ds39935c-page 156 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 157 enc424j600/624j600 appendix a: revision history revision a (march 2009) original data sheet for enc424j600/624j600 devices. revision b (july 2009) removed preliminary from the data sheet. section 1.0 device overview and section 7.0 reset had minor edits. revision c (january 2010) section 5.3.3 mode 3 and section 5.3.4 mode 4 had minor edits. downloaded from: http:///
enc424j600/624j600 ds39935c-page 158 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 159 enc424j600/624j600 index a ac characteristics clkout pin ............................................................. 145 clkout pin timing specifications .......................... 145 enc424j600/624j600 (industrial)............................ 145 oscillator timing ..................... ............................ ...... 145 psp interface timing specifications......................... 147 spi interface ............................................................. 146 advanced encryption standard (aes) context switching ..................................................... 130 key support .............................................. ................ 129 b block diagrams alternate tx choke topology..................................... 12 bi-color led connection.......................................... .. 12 cbc encryption/decryption ...................................... 131 cfb encryption/decryption....................................... 132 crystal oscillator operation .......................................... 9 ctr encryption/decryption ...................................... 134 ecb encryption/decryption ...................................... 130 enc424j600/624j600.............................................. .... 6 ethernet packet format .............................................. 71 example tx buffer wrapping ..................................... 83 external clock source .................................................. 9 i/o level shifting on spi interface using 3-state buffers.......................................... 15 i/o level shifting on spi interface using and gates ............................................... 15 interrupt logic ........................................................... 117 ofb encryption/decryption ...................................... 133 on-chip reset circuit ................................................. 73 psp external connections mode 1............................. 54 psp external connections mode 10........................... 69 psp external connections mode 2............................. 55 psp external connections mode 3............................. 57 psp external connections mode 4............................. 59 psp external connections mode 5............................. 62 psp external connections mode 6............................. 65 psp external connections mode 9............................. 67 rbias resistor ........................................................... 10 receive filter decision tree....................................... 98 single color led connection ..................................... 12 typical ethernet magnetics connections.................... 11 using int /spisel pin to select i/o interface ............ 13 v cap connections............................................... ........ 10 buffer pointers (sram access).......................................... 34 c clkout pin ......................................................................... 9 crc frame field................................................................. 72 cryptographic security engines advanced encryption standard (aes)...................... 129 cipher block chaining mode (cbc) ................. 131 cipher feedback mode (cfb) .......................... 132 counter mode (ctr) ........................................ 134 electronic code book mode (ecb) .................. 130 output feedback mode (ofb) ......................... 133 md5/sha-1 hashing................................................. 126 context switching ............................................. 128 modular exponentiation .......................................... .. 125 customer change notification service............................. 162 customer notification service .......................................... 162 customer support.............................................. ............... 162 d dc characteristics enc424j600/624j600 (industrial) ........................... 143 internal voltage regulator........................................ 144 requirements for external magnets ......................... 144 thermal operating conditions.................................. 142 thermal packaging................................................... 142 destination address........................................................ .... 71 device features (table) ........................................................ 5 device initialization ......................................... .............. 75C76 digital i/o levels................................................................. 15 direct memory access (dma) controller.......................... 123 dma controller checksum calculations ............................................ 124 copying memory ...................................................... 123 performance ............................................................. 124 e e registers ......................................................................... 19 electrical characteristics .................................................. 14 1 absolute maximum ratings...................................... 141 enc424j600/624j600 register file summary ............ 26C27 energy detect power-down ............................................. 137 equations increment logic for egprdpt and egpwrpt ........ 35 increment logic for erxrdpt and erxwrpt......... 36 increment logic for eudardpt and eudawrpt ............................................... . 36 errata .............................................................................. ...... 4 ethernet frame format............................................................. 71 ethernet frame format ...................................................... 71 ethernet overview .............................................................. 71 examples deriving a hash table location ............................... 100 external connections cs/cs pin .................................................................. 15 digital i/o levels ........................................................ 15 emi and layout considerations ................................. 12 leda and ledb......................................................... 12 oscillator....................................................................... 9 psp host interface ..................................................... 14 rbias pin................................................................... 10 spi host interface ...................................................... 14 v cap pin ..................................................................... 10 v dd /v ss pins.............................................................. 10 external power-down ....................................................... 1 38 f fast link pulses (flps).................................................... 109 flow control automatic control ..................................................... 106 full-duplex operation............................................... 105 half-duplex operation .............................................. 105 manual control ......................................................... 106 pause control frames.............................................. 105 receive watermark register.................................... 106 frame padding (field) ........................................... ............. 72 downloaded from: http:///
enc424j600/624j600 ds39935c-page 160 ? 2010 microchip technology inc. g general power-down sequence....................................... 137 h host interface pins........................................ ................ 13C15 i i/o level shifting................................................................. 15 initialization after link establishment ............................................. 7 6 clkout frequency ............................................ ....... 75 mac ............................................................................ 75 phy............................................................................. 76 receive buffer ............................................................ 75 receive filters ............................................................ 75 reset........................................................................... 75 transmit buffer ........................................................... 75 int pin ................................................................................ 13 internet address................................................................ 162 interrupts sources ................................................ ............. 121C122 wake-on-lan/remote wake-up .............................. 122 intie global interrupt enable bit...................................... .. 117 m mac registers .................................................................... 19 magnetics and external components ................................. 11 md5 hashing .................................................................... 126 memory map cryptographic data memory ....................................... 32 psp............................................................................. 18 spi .............................................................................. 17 sram indirect access pointers .................................. 34 microchip internet web site .............................................. 162 modular exponentiation engine ........................................ 125 n n-byte instructions banked sfr................................................................ 45 sram buffer ............................................................... 49 unbanked sfr ................................................ ........... 47 o oscillator ............................................................................... 9 p packaging details ....................................................................... 150 marking ..................................................................... 149 parallel slave port interface (psp) external connections ............................................ ...... 14 mode 1 ................................................. ....................... 53 mode 10 ................................................. ..................... 69 mode 2 ................................................. ....................... 55 mode 3 ................................................. ....................... 57 mode 4 ................................................. ....................... 59 mode 5 ................................................. ....................... 61 mode 6 ................................................. ....................... 64 mode 9 ................................................. ....................... 67 performance considerations ...................................... 53 physical implementation ............................................. 51 using the interface..................................................... 52 phy register file summary ............................................... 31 phy registers................................................................. .... 28 phy subystem reset ......................................................... 74 pin functions a14:a0 .......................................................................... 7 ad15:ad0..................................................................... 7 al ................................................................................. 7 b0sel/b1sel .............................................................. 7 clkout ....................................................................... 7 cs/cs ........................................................................... 7 en................................................................................. 7 int ................................................................................ 7 leda/ledb .................................................................. 7 osc1/osc2 ................................................................. 8 pspcfg4:pspcfg0 ................................................... 8 rbias ........................................................................... 8 rd ................................................................................ 8 rw ................................................................................ 8 sck .............................................................................. 8 si .................................................................................. 8 so ................................................................................ 8 spisel ......................................................................... 8 tpin+/tpin- ................................................................. 8 tpout+/tpout- ......................................................... 8 v cap ............................................................................. 8 v dd /v ss ........................................................................ 8 v ddosc /v ssosc ........................................................... 8 v ddpll /v sspll .............................................................. 8 v ddrx /v ssrx ................................................................ 8 v ddtx /v sstx ................................................................. 8 wr................................................................................ 8 wrh/wrl .................................................................... 8 pinout descriptions......................................... .................. 7C8 power-on reset .................................................................. 73 power-saving features .................................................... 137 psp mode selection (table)....................................... ......... 14 r reader response................................................. ............ 163 receive filters .................................................................... 72 broadcast collection................................................. 100 crc error collection/rejection .................................. 99 hash table collection............................................... 100 magic packet collection ........................................... 101 multicast collection................................................... 100 not-me unicast collection .......................................... 99 pattern match collection........................................... 102 pattern match collection (example).......................... 103 promiscuous mode ................................................... 102 runt error collection/rejection .................................. 99 unicast collection ....................................................... 99 receive only reset ............................................................ 74 receiving packets ............................................. ........... 86C87 configuring reception ................................................ 87 erxhead/erxtail buffer wrap (example) ............. 86 incoming packet storage...................................... ...... 87 receive status vector ................................................ 89 receive status vector (rsv) ..................................... 87 received packet in buffer memory (example) ........... 88 status vectors ............................................................ 89 register maps clr (8-bit psp).......................................................... 24 set (8-bit psp).......................................................... 23 set/clr (16-bit psp)................................................ 25 downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 161 enc424j600/624j600 registers econ1 (ethernet control 1) ....................................... 90 econ2 (ethernet control 2) ....................................... 77 eidled (ethernet id status/led control).................. 79 eie (ethernet interrupt enable)................................. 120 eir (ethernet interrupt flag)..................................... 118 erxfcon (ethernet rx filter control)...................... 96 erxwm (receive watermark) ................................. 106 estat (ethernet status) ............................................ 93 etxstat (ethernet transmit status)......................... 92 mabbipg (mac back-to-back inter-packet gap) ............................................... 81 maclcon (mac collision control) ........................... 82 macon1 (mac control 1)........................................ 107 macon2 (mac control 2).......................................... 80 maipg (mac inter-packet gap)................................. 82 micmd (mii management command)........................ 30 miregadr (mii management address) .................... 29 mistat (mii management status) ............................. 30 phana (phy auto-negotiation advertisement).................................................. 113 phane (phy auto-negotiation expansion) ............. 115 phanlpa (phy auto-negotiation link partner ability) ................... ......................... ...... 114 phcon1 (phy control 1)......................................... 110 phcon2 (phy control 2)......................................... 139 phstat1 (phy status 1)......................................... 111 phstat2 (phy status 2)......................................... 112 phstat3 (phy status 3)......................................... 112 reset phy subsystem.......................................................... 74 power-on..................................................................... 73 receive only............................................................... 74 system ........................................................................ 73 transmit only.............................................................. 74 revision history ................................................................ 157 s serial peripheral interface (spi) external connections............................................ ...... 14 instruction set ............................................................. 39 physical implementation ............................................. 39 sfr. see special function registers................................. 19 sha-1 hashing ................................................................. 126 single byte instructions ...................................................... 41 source address .................................................................. 72 special function registers ................................................. 19 address map 16-bit psp .......................................................... 22 8-bit psp ............................................................ 21 spi ...................................................................... 20 phy registers ............................................................ 28 speed/duplex auto-negotiation........................................ 109 manual configuration............................................. ... 109 spi instruction set n-byte instructions banked sfr ....................................................... 45 sram buffer ....................................................... 49 unbanked sfr ............................................... .... 47 single byte instructions .............................................. 41 summary table........................................................... 40 three-byte instructions............................................... 43 two-byte instructions ................................................. 42 sram buffer....................................................................... 32 buffer pointers............................................................ 34 circular wrapping erxdata pointer .............................................. 36 eudadata pointer..................................... . 36C37 circular wrapping with egpdata pointer ................. 35 direct access.............................................................. 33 general purpose buffer........................................... ... 33 indirect access ........................................................... 34 receive buffer ............................................................ 33 transmit buffer ........................................................... 33 start-of-frame delimiter .................................................... 71 start-of-stream/preamble field .......................................... 71 system reset ..................................................................... 73 t three-byte instructions....................................................... 43 timing diagrams n-byte spi instruction (banked sfr operations) .................................. 45 n-byte spi opcode (unbanked sfr operations) .............................. 47 n-byte spi opcode instruction (sram buffer operations).................................. 49 psp mode 1 read............................................ .......... 54 psp mode 1 write .......................................... ............ 54 psp mode 10 read.............................................. ...... 70 psp mode 10 write .......................................... .......... 70 psp mode 2 read............................................ .......... 56 psp mode 2 write .......................................... ............ 56 psp mode 3 read............................................ .......... 58 psp mode 3 write .......................................... ............ 58 psp mode 4 read............................................ .......... 60 psp mode 4 write .......................................... ............ 60 psp mode 5 read............................................ .......... 63 psp mode 5 write .......................................... ............ 63 psp mode 6 read............................................ .......... 66 psp mode 6 write .......................................... ............ 66 psp mode 9 read............................................ .......... 68 psp mode 9 write .......................................... ............ 68 single byte instruction................................................ 41 spi input.............................................. ..................... 146 spi output ................................................................ 146 three-byte read instruction...................................... . 43 three-byte write instruction....................................... 43 two-byte instruction (rbsel opcode) ...................... 42 transmit only reset ........................................................... 74 transmitting packets ...................................... .............. 83C86 selecting etxlen values (example)......................... 84 special cases............................................................. 85 transmission status ................................................... 85 two-byte instructions ......................................................... 42 type/length field ............................................ ................... 72 w wake-on-lan/remote wake-up ...................................... 122 www address ................................................ ................. 162 www, on-line support ............................................. .......... 4 downloaded from: http:///
enc424j600/624j600 ds39935c-page 162 ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 163 enc424j600/624j600 the microchip web site microchip provides online support via our www site at www.microchip.com. this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: product support C data sheets and errata, application notes and sample programs, design resources, users guides and hardware support documents, latest software releases and archived software general technical support C frequently asked questions (faq), technical support requests, online discussion groups, microchip consultant program member listing business of microchip C product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchips customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. to register, access the microchip web site at www.microchip.com, click on customer change notification and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: distributor or representative local sales office field application engineer (fae) technical support development systems information line customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sales offices and locations is included in the back of this document. technical support is available through the web site at: http://support.microchip.com downloaded from: http:///
enc424j600/624j600 ds39935c-page 164 ? 2010 microchip technology inc. reader response it is our intention to provide you with the best documentation possible to ensure successful use of your microchip prod- uct. if you wish to provide your comments on organization, clarity, subject matter, and ways in wh ich our documentation can better serve you, please fax your comments to the technical publications manager at (480) 792-4150. please list the following information, and use this outline to provide us with your comments about this docume nt. to : technical publications manager re: reader response total pages sent ________ from: name company address city / state / zip / country telephone: (_______) _________ - _________ application (optional): would you like a reply? y n device: literature number: questions: fax: (______) _________ - _________ ds39935c enc424j600/624j600 1. what are the best features of this document? 2. how does this document meet your hardware and software development needs? 3. do you find the organization of this document easy to follow? if not, why? 4. what additions to the document do you think would enhance the structure and subject? 5. what deletions from the document could be made without affecting the overall usefulness? 6. is there any incorrect or misleading information (what and where)? 7. how would you improve this document? downloaded from: http:///
? 2010 microchip technology inc. ds39935c-page 165 enc424j600/624j600 product identification system to order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office . part no. x /xx xxx pattern package temperature range device device enc424j600, enc624j600, enc424j600t (1) , enc624j600t (1) ; v dd range 3.0v to 3.6v temperature range i = -40 ? c to +85 ? c (industrial) package ml = qfn (quad flat no lead) pt = tqfp (thin quad flatpack) pattern three-digit code or special requirements (blank otherwise) es = engineering sample examples: a) enc424j600-i/ml = industrial temp., qfn package. b) enc424j600-i/pt = industrial temp., 44 leads tqfp package. c) enc624j600t-i/pt = industrial temp., 64 leads tqfp package, tape and reel. note 1: t = in tape and reel. downloaded from: http:///
ds39935c-page 166 ? 2010 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-6578-300 fax: 886-3-6578-370 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-536-4803 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 01/05/10 downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of ENC624J600T-IPT

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X